Skip to content

devolo Smoke Detector

Guido Schmitz edited this page Nov 7, 2020 · 3 revisions

The following snippets assume, that you already created a working instance of HomeControl and an instance of Mydevolo. Please see the page about connecting to the backend for further information.

Get state of a smoke detector

First you need to find the device UID of the smoke detector you want to query - in this snippet called "Smoke" located in "Office". Then you need to find the property "binary_sensor". Since the devolo Smoke Detectors only have one sensor, you can directly access the first list object and access the state. There is also an attribute showing the date of the last change of the state. This date is of type datetime.

smoke_detector = homecontrol.devices.get(homecontrol.device_names.get("Smoke/Office"))
binary_sensor = smoke_detector.get_property("binary_sensor")[0]
print(binary_sensor.state)
print(binary_sensor.last_activity)
Clone this wiki locally