If the computer with TeamsStatusPub is rebooting or the app isn't otherwise running, Home Assistant logs the following messages:
[homeassistant.components.rest.data] Error fetching data: http://192.168.1.1:17493/ failed with
[homeassistant.helpers.template] Template variable error: 'value_json' is undefined when rendering '{{ value_json.busy }}'
This causes the automation to_state to be "unavailable" causing the light.turn_unavailable service to be used which doesn't exist which ends up with the result of the light not being toggled on. This is what we want in the end but it's not elegant and causes a lot of entries in the log.
The other side to this is when the computer with TeamsStatusPub is rebooted or otherwise isn't running after the light has already been turned on, Home Assistant will encounter the same behavior and never turn off the light.
There should be a fallback to the binary sensor in cases where the computer isn't reachable.
If the computer with TeamsStatusPub is rebooting or the app isn't otherwise running, Home Assistant logs the following messages:
This causes the automation
to_state
to be "unavailable" causing thelight.turn_unavailable
service to be used which doesn't exist which ends up with the result of the light not being toggled on. This is what we want in the end but it's not elegant and causes a lot of entries in the log.The other side to this is when the computer with TeamsStatusPub is rebooted or otherwise isn't running after the light has already been turned on, Home Assistant will encounter the same behavior and never turn off the light.
There should be a fallback to the binary sensor in cases where the computer isn't reachable.