#I got this comment from copilot <https
1 messages · Page 1 of 1 (latest)
Similar question for is_on in a SwitchEntity. I also was under the assumption that this would only be called if available was True
Copy pasting my DM response to Mike:
I don't think it's true:
https://github.com/home-assistant/core/blob/507b5f1bbfcbfc9d9a3763a45e3d473ac71d3413/homeassistant/helpers/entity.py#L1056-L1069
In the RestoreSensor we seem to do that though:
https://github.com/home-assistant/core/blob/507b5f1bbfcbfc9d9a3763a45e3d473ac71d3413/homeassistant/components/sensor/__init__.py#L981