From cc83ae35ba098428b2cfa0553405d72128ff232a Mon Sep 17 00:00:00 2001 From: Xavier Moreno Date: Thu, 15 Oct 2020 21:16:26 +0200 Subject: [PATCH 1/2] docs(device): change ZHA integration doc for Hue Dimmer controller --- apps/controllerx/controllerx.py | 2 +- .../cx_devices/{philips.py => phillips.py} | 0 docs/_data/controllers/hue-dimmer-switch.yml | 22 ++++++++++++------- tests/unit_tests/cx_devices/phillips_test.py | 2 +- 4 files changed, 16 insertions(+), 10 deletions(-) rename apps/controllerx/cx_devices/{philips.py => phillips.py} (100%) diff --git a/apps/controllerx/controllerx.py b/apps/controllerx/controllerx.py index 388b1e91..00cc000f 100755 --- a/apps/controllerx/controllerx.py +++ b/apps/controllerx/controllerx.py @@ -19,7 +19,7 @@ from cx_devices.ikea import * from cx_devices.legrand import * from cx_devices.lutron import * -from cx_devices.philips import * +from cx_devices.phillips import * from cx_devices.smartthings import * from cx_devices.trust import * from cx_devices.muller_licht import * diff --git a/apps/controllerx/cx_devices/philips.py b/apps/controllerx/cx_devices/phillips.py similarity index 100% rename from apps/controllerx/cx_devices/philips.py rename to apps/controllerx/cx_devices/phillips.py diff --git a/docs/_data/controllers/hue-dimmer-switch.yml b/docs/_data/controllers/hue-dimmer-switch.yml index a85cde0e..1430994c 100644 --- a/docs/_data/controllers/hue-dimmer-switch.yml +++ b/docs/_data/controllers/hue-dimmer-switch.yml @@ -50,14 +50,20 @@ integrations: - "4003 → Hold release \"O\"" - name: ZHA codename: zha - actions: - - "on → Click \"I\"" - - "step_0_30_9 → Click 🔆" - - "step_0_56_9 → Hold 🔆" - - "step_1_30_9 → Click 🔅" - - "step_1_56_9 → Hold 🔅" - - "off_with_effect_0_0 → Click \"O\"" - - "stop → Release brightness buttons" + actions: # CHANGE THIS + - on_short_release → Click \"I\"" + - on_hold → Hold \"I\"" + - on_long_release → Release \"I\"" + - up_short_release → Click 🔆" + - up_hold → Hold 🔆" + - up_long_release → Release 🔆" + - down_short_release → Click 🔅" + - down_hold → Hold 🔅" + - down_long_release → Release 🔅" + - off_short_release → Click \"O\"" + - off_hold → Hold \"O\"" + - off_long_release → Release \"O\"" + note: >- For ZHA integration, the hold events just work for the brightness buttons, and they are fired right after the click events. diff --git a/tests/unit_tests/cx_devices/phillips_test.py b/tests/unit_tests/cx_devices/phillips_test.py index 3c1a8853..35a0c1c9 100644 --- a/tests/unit_tests/cx_devices/phillips_test.py +++ b/tests/unit_tests/cx_devices/phillips_test.py @@ -1,5 +1,5 @@ import pytest -from cx_devices.philips import HueDimmerController +from cx_devices.phillips import HueDimmerController @pytest.mark.parametrize( From f9286d88652be457a9f84a6547ae1db5e708f45f Mon Sep 17 00:00:00 2001 From: Xavier Moreno Date: Thu, 15 Oct 2020 21:19:58 +0200 Subject: [PATCH 2/2] docs(device): Hue Dimmer controller (ZHA integration) --- docs/_data/controllers/hue-dimmer-switch.yml | 24 ++++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/_data/controllers/hue-dimmer-switch.yml b/docs/_data/controllers/hue-dimmer-switch.yml index 1430994c..149e20b9 100644 --- a/docs/_data/controllers/hue-dimmer-switch.yml +++ b/docs/_data/controllers/hue-dimmer-switch.yml @@ -51,18 +51,18 @@ integrations: - name: ZHA codename: zha actions: # CHANGE THIS - - on_short_release → Click \"I\"" - - on_hold → Hold \"I\"" - - on_long_release → Release \"I\"" - - up_short_release → Click 🔆" - - up_hold → Hold 🔆" - - up_long_release → Release 🔆" - - down_short_release → Click 🔅" - - down_hold → Hold 🔅" - - down_long_release → Release 🔅" - - off_short_release → Click \"O\"" - - off_hold → Hold \"O\"" - - off_long_release → Release \"O\"" + - "on_short_release → Click \"I\"" + - "on_hold → Hold \"I\"" + - "on_long_release → Release \"I\"" + - "up_short_release → Click 🔆" + - "up_hold → Hold 🔆" + - "up_long_release → Release 🔆" + - "down_short_release → Click 🔅" + - "down_hold → Hold 🔅" + - "down_long_release → Release 🔅" + - "off_short_release → Click \"O\"" + - "off_hold → Hold \"O\"" + - "off_long_release → Release \"O\"" note: >- For ZHA integration, the hold events just work for the brightness buttons,