Skip to content

Commit

Permalink
properly get sensor status from StateMachine (#247)
Browse files Browse the repository at this point in the history
* properly get sensor status from StateMachine

* fixes #246

* forgot the property
  • Loading branch information
firstof9 authored Oct 29, 2021
1 parent 941b20c commit c5527e9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions custom_components/keymaster/system_health.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@ def async_register(
async def system_health_info(hass):
"""Get info for the info page."""
client = hass.data[DOMAIN]
network_sensor = f"binary_sensor.{client['network_sensor']}"

return {
"zwave_integration": client["zwave_integration"],
"network_status": hass.states[
f"binary_sensor.{client['network_sensor']}"
].state,
"network_status": hass.states.get(network_sensor).state,
}

0 comments on commit c5527e9

Please sign in to comment.