Hi Philip, thanks for the codes. I am now trying out your code to integrate with my script in HA for the swipe action. To do this I have already switched to OpenZwave.
Since I want to use your python script to manage non-zwave lights I need to change the last line to call my script instead. Unfortunately I can’t find any good documentation as how to call the script service from python. I now got the following:
hass.services.call('script', 'dimmer', {
'light_id': light_id,
'swipe_action': swipe_action,
}, False)
But too bad it doesn’t work. Syntax is correct because HA doesn’t complain about it. In the log I see:
2021-01-15 12:27:35 INFO (SyncWorker_6) [homeassistant.components.python_script] Executing wallmote_handler.py: {'node_id': 4, 'event': 'valueChanged', 'value': 33655783, 'index': 9}
2021-01-15 12:27:36 INFO (MainThread) [homeassistant.components.automation.wallmote_swipe_handling] Wallmote Swipe Handling: Running automation actions
2021-01-15 12:27:36 INFO (MainThread) [homeassistant.components.automation.wallmote_swipe_handling] Wallmote Swipe Handling: Executing step call service
2021-01-15 12:27:36 INFO (SyncWorker_18) [homeassistant.components.python_script] Executing wallmote_handler.py: {'node_id': 4, 'event': 'valueChanged', 'value': 33671400, 'index': 10}
I can see that the python script is being executed but the script never gets called. Do you know how to call the script service (script.dimmer) from within python along with variables? Thank you!