Skip to content

Commit 1d306a9

Browse files
authored
Update number async_set_native_value
1 parent 5c39eb5 commit 1d306a9

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

custom_components/cometblue/number.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -127,19 +127,15 @@ def native_value(self) -> float | None:
127127
return self.coordinator.data.get(self.entity_description.cometblue_key)
128128

129129
async def async_set_native_value(self, value: float) -> None:
130-
"""Update to the vehicle."""
130+
"""Update to the device."""
131131

132-
if self.entity_description.key == "offset" and value < 0:
133-
raise NotImplementedError("Offsets <0 are not implemented in the library")
134132
await self.coordinator.send_command(
135133
"set_temperature_async",
136134
{
137135
"values": {
138-
{
139-
# manual temperature always needs to be set, otherwise TRV will turn OFF
140-
"manualTemp": self.coordinator.data["manualTemp"],
141-
self.entity_description.cometblue_key: value,
142-
}
136+
# manual temperature always needs to be set, otherwise TRV will turn OFF
137+
"manualTemp": self.coordinator.data["manualTemp"],
138+
self.entity_description.cometblue_key: value,
143139
}
144140
},
145141
self.entity_id,

0 commit comments

Comments
 (0)