Fix incorrect Rainmachine dict lookups (#30550)

This commit is contained in:
Aaron Bach 2020-01-07 10:43:12 -07:00 committed by GitHub
parent 9aa02e35a7
commit 856db4d122
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 6 deletions

View file

@ -96,7 +96,9 @@ class RainMachineBinarySensor(RainMachineEntity, BinarySensorDevice):
async def async_update(self):
"""Update the state."""
if self._sensor_type == TYPE_FLOW_SENSOR:
self._state = self.rainmachine.data[PROVISION_SETTINGS].get("useFlowSensor")
self._state = self.rainmachine.data[PROVISION_SETTINGS]["system"].get(
"useFlowSensor"
)
elif self._sensor_type == TYPE_FREEZE:
self._state = self.rainmachine.data[RESTRICTIONS_CURRENT]["freeze"]
elif self._sensor_type == TYPE_FREEZE_PROTECTION: