I’m attempting to make a demo video on setting LEDs on our switch with HA but am running into issues. Does anyone have experience in doing this? If so, post a reply and I’ll detail the issues.
In a nutshell, we control the status mode and normal mode of the switch (in HomeSeer software) this way:
If any of the status LEDs are lit, we change the LED mode of the switch to STATUS mode. If none of the status LEDs are lit, then we change the LED mode to normal (load tracking) mode.
So… wondering if anyone is doing this in HA and, if so, what the method is? TIA - Mark
I’m able do part of what I want with the built in actions
What I’m wondering is whether or not someone has already figured out how to change the switch from STATUS mode to NORMAL mode when all of the LEDs are set to OFF.
There are no entities for config parameters (maybe that will change someday), so you can’t read the current mode without using some pretty advanced functionality.
You would need to create your own template sensor to handle this. An example is provided here. The trigger would match on the configuration parameter value ID, these value IDs are visible in the device diagnostics file which can be downloaded from the device page.
@freshcoast Thanks for the suggestion. I think I figured out a way to do this that’s not too complicated. If I create an “LED Counter”, I can increment it every time an automation sets a status to an LED. Then, I can decrement it every time an automation sets a status LED off. That way, the counter should return to “0” when all LEDs are off. So, I can just add 2 more automations: 1 to enable status mode when the counter is greater than “0” and 1 to disable status mode when the counter is “0”. I’ll test this tomorrow but it seems like it should work.
@hecarethwosu Thanks for sharing that. I have an instance of Node Red running at home but it’s only doing Alexa TTS announcements for my HomeSeer system. I have not added it to my HA setup, at least not yet. Today, I did a write up for how to set up status LEDs on the WX300 just within the HA automation engine. I’ve posted that here: HS-WX300 Triggers and Actions in Home Assistant | This is what it looks like in action:
@HomeSeerMark Hi Mark, trying to find your write up but the link leads to a 404 page. I’m moving over to HA from HomeSeer and trying to get the status lights working the way they used to. Do you happen to still have that write up on how you solved it?
Thanks for updating with your method. The original description got me started and what I came up with was a simple automation for each LED to make them follow state changes as needed. This example lights a status LED by the front door when the driveway motion sensor has detected motion / turns it off when the motion sensor resets. I use the LEDs at the bottom to show light switch status then the uppers are open and used for general notifications. I like these switches a lot so far!
alias: Porch_StatusLED07
description: "sets LED status on HomeSeer WX300 to follow a sensor "
trigger:
- platform: state
entity_id:
- binary_sensor.driveway_floodlight_motion_detection
from: null
to: null
condition: []
action:
- if:
- condition: state
entity_id: binary_sensor.driveway_floodlight_motion_detection
state: "on"
then:
- device_id: xxxxxxxxx
domain: zwave_js
type: set_config_parameter
endpoint: 0
parameter: 27
bitmask: null
subtype: 27 (Status LED 7 Color) on endpoint 0
value: 1
else:
- device_id: xxxxxxxxx
domain: zwave_js
type: set_config_parameter
endpoint: 0
parameter: 27
bitmask: null
subtype: 27 (Status LED 7 Color) on endpoint 0
value: 0
mode: single