From 552461f8ef35e88b8799b75204d1426b6e790386 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Mon, 27 May 2024 00:30:13 +0200 Subject: [PATCH] Updated home page --- www/index.html | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/www/index.html b/www/index.html index 8ad71e3..23cf4a7 100644 --- a/www/index.html +++ b/www/index.html @@ -41,13 +41,13 @@ Blog
- Wiki + Wiki
App
- Social + Lemmy
@@ -111,11 +111,8 @@

Extensions may come with optional sets of additional dependencies, and they can be easily installed - through pip - see the setup.py for a full list of supported extras. The documentation also provided the required - dependencies for each integration. + through pip extras. The documentation also provides the required dependencies for each integration.

@@ -166,13 +163,12 @@
-
from platypush.event.hook import hook -from platypush.utils import run -from platypush.message.event.zigbee.mqtt import ZigbeeMqttDevicePropertySetEvent +
from platypush import run, when +from platypush.events.zigbee.mqtt import ZigbeeMqttDevicePropertySetEvent -@hook(ZigbeeMqttDevicePropertySetEvent, device='My motion sensor') -def on_sensor_value_change(event, **ctx): - has_motion = event.args.get('properties', {}).get('motion') +@when(ZigbeeMqttDevicePropertySetEvent, device='My motion sensor') +def on_sensor_value_change(event): + has_motion = event.properties.get('motion') # Turn on the lights when motion is detected if has_motion is True: run('light.hue.on') @@ -345,19 +341,19 @@