Skip to content

Commit

Permalink
Release 0.10.0
Browse files Browse the repository at this point in the history
- Add `state_class` property to Sensor class, fixes #96
- Add ability to specify non-standard MQTT ports, closes #91
- Various dependency bumps
- Add `Number` entity type, and update README docs for `Switch` and `Button`

Signed-off-by: Joe Block <[email protected]>
  • Loading branch information
unixorn committed Sep 24, 2023
1 parent 91e06e3 commit a20966d
Show file tree
Hide file tree
Showing 3 changed files with 186 additions and 141 deletions.
4 changes: 1 addition & 3 deletions ha_mqtt_discoverable/sensors.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,9 +282,7 @@ def set_value(self, value: float) -> None:
"""
if not self._entity.min <= value <= self._entity.max:
bound = f"[{self._entity.min}, {self._entity.max}]"
raise RuntimeError(
f"Value is not within configured boundaries {bound}"
)
raise RuntimeError(f"Value is not within configured boundaries {bound}")

logger.info(f"Setting {self._entity.name} to {value} using {self.state_topic}")
self._state_helper(value)
Loading

0 comments on commit a20966d

Please sign in to comment.