Did you restart home assistant after creating the python file?
Yes I did. But I already found the Issue: I forgot to add the following entry in the configuration.yaml:
zha:
enable_quirks: true
custom_quirks_path: /config/custom_zha_quirks
Thank you for providing this solution . It makes the button more usable.
I tried the same, but doesn’t work for me. Added all lines to config, restarted, but still get an error log:
''Invalid config for [script]: value must be one of [‘brightness_decrease’, ‘brightness_increase’, ‘flash’, toggle', 'turn_off', 'turn_on'] for dictionary value @ data['type']. Got None. (See /config/configuration.yaml, line 12).
Any advice? Thank you!
(Sorry for bad formatting, first post )
Could you check or post the lines of your config in this specific lines ?
config.yaml:
zha:
enable_quirks: true
custom_quirks_path: /config/zha_custom_quirks/
I’ve created the directory and *.py file. The *.py contains the exact copy of the code from drauboss:
Her’s the exact log:
Logger: homeassistant.config
Source: config.py:454
First occurred: 12:32:33 (1 occurrences)
Last logged: 12:32:33
Invalid config for [script]: value must be one of [‘brightness_decrease’, ‘brightness_increase’, ‘flash’, ‘toggle’, ‘turn_off’, ‘turn_on’] for dictionary value @ data[‘type’]. Got None. (See /config/configuration.yaml, line 12).
Thank you!
Did you try with indentation here ?
Then you should check if your configuration is valid before restart:
Hi,
could you explain how did you connect your Lidl button to the Homeassistant? I cannot understand how I should do it. The 5s on the button does not make it enter pairing mode, as other Zigbee devices do…
thanks!
The reset button is under the cover where you would find the battery. Open the cover and keep the tiny reset button for 5 seconds and the light on the button will start blink for pairing mode
Instead of making a quirk, would it be simpler to change the automation so that when you get the single press “on” command it does a “toggle” of the light? That way each time you press it once it will change the light? This is what we have in our in-wall switches: press once to switch the light.
Wow thanks! I could not find it, and was about to give it back to the shop, but this evening I will try to connect it, I hope it works
Best regards!
I got it working by creating two automations:
First one triggers when button is turned on → Condition: Light is Off → Actions: Turn light on → Actions: Turn button off
Second one triggers when button is turned on → Condition: Light is On → Actions: Turn light on → Actions: Turn button Off
So now when you press button once either one activates depending on status of the light. It is important to turn button off to get this working after every action. If you turn button on from HA then there is small hiccup until button is switched off.
Hello, everyone! Is this “quirks” solution from Drauboss still necessary? I think the buttons are available in the automation… but they just don’t do anything :-))
How can I listen to the button signals again in HA with the ZHA command? Does anyone happen to know this?
Hi, unfortune yes: in device manager it showes up as a switch, which status can be set by one klick and reset by double klick. It’s appears to be HW coded inside firmware.
In princible jrauti script from above should solve, but in my case the Action: Turn off (the device-) button does not work most of the time (even manually falls back after senconds)
Haven’t checked Drauboss script, yet. But a need for a workaround to a simple switch is kind of no go for me.
I have a silvercrest smart button working fine in HA.
Setup is a bit different since I use zigbee2mqtt and I wanted to control 2 lights with one switch so I did the following
Single press (“on action”): toggles “main” light
double press (“off action”): toggles “secondary” light
That is one way to do it. I got it also running with the custom quirks. Now I have the options to use single press, double press and longpress release. Only thing I would like to still achive is to be able to adjust the long press time. Now it feels like forever, multiple seconds anyway.
Works perfect. Short and double press work as expected. Thanks
But I‘m not very familiar with quirks.
How could I use the Dim/Rotate function? Can someone modify above code?
I need that too and I have the problem when I press the button for 3-4 seconds that nothing happens (no entry in the activity log).
Thank you guys. That’s works perfect.
Thank you very much. Works perfect for me!
Me too! Is there a way to use the Dim function?
The imported functions DIM_UP and DIM_DOWN do not seem to work.
What is the difference between COMMAND_MOVE and COMMAND_MOVE_SATURATION ?