mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 12:59:34 +00:00
Update pyrainbird to version 0.2.1 to fix zone number (#26064)
* Update pyrainbird to version 0.2.0 to fix zone number issue: - home-assistant/home-assistant/issues/24519 - jbarrancos/pyrainbird/issues/5 - https://community.home-assistant.io/t/rainbird-zone-switches-5-8-dont-correspond/104705 * requirements_all.txt regenerated * code formatting * code formatting * response checking * fixed switch state * pyrainbird version bump * formatting * version bump * if instead elif
This commit is contained in:
committed by
Martin Hjelmare
parent
a347a41d3c
commit
0e4504296e
@@ -56,7 +56,11 @@ class RainBirdSensor(Entity):
|
||||
"""Get the latest data and updates the states."""
|
||||
_LOGGER.debug("Updating sensor: %s", self._name)
|
||||
if self._sensor_type == "rainsensor":
|
||||
self._state = self._controller.currentRainSensorState()
|
||||
result = self._controller.currentRainSensorState()
|
||||
if result and result["type"] == "CurrentRainSensorStateResponse":
|
||||
self._state = result["sensorState"]
|
||||
else:
|
||||
self._state = None
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
|
||||
Reference in New Issue
Block a user