Closed jamieshaw closed 3 years ago
Yes, this should be quite easily doable.
The underlying googledevices
library already offers a function to poll that:
https://github.com/Drakulix/googlehome/blob/master/custom_components/googlehome/googledevices/api/cast/assistant.py#L35
One would need to add a new update_
function to query the Do Not Distrub state and add a new switch component (very similar to the sensor.py), which then needs to be initialized here.
I have personally no use and no time for this feature. But I would gladly accept a PR implementing this functionality.
Previously, before authentication was required, I was polling the Do Not Disturb REST endpoint to create a switch within Home Assistant.
Is it possible to create a switch within the custom component that calls upon
/setup/assistant/notifications
for similar effect?