Controlling brightness with second button Fibaro Dimmer 2

I’m using several Fibaro dimmers 2 in my home. One of the properties of these dimmers is that you can activate scene’s with the second button. For example it’s send event.scene_id: 21 (just once) for holding the second and event.scene_id: 22 for releasing the second button.

Now I would like to create a flow that once the scene_id: 21 is received the brigthness of another zwave dimmer (without buttons attached), or the volume of my sonos, is set in steps until scene_id: 22 is received.

I think I should do something with an while loop, but I can’t figure it out. Can please someone help me with this?

Hello Björn_Timmer, I do not have Fibaro switches, but I did a little tutorial for Xiaomi switches, maybe that works for you with the corresponding changes … Look here…
https://community.home-assistant.io/t/xiaomi-devices-tutorial/122827

Hi VolkerKa,

This is just simple switching on and off the lights, I already created this in node-red. I’m trying to figure out how to dim my lights.

[{"id":"98c6d742.6646b8","type":"api-call-service","z":"fac037bf.a42d78","name":"Night Light","service_domain":"light","service":"turn_on","data":"{\"entity_id\":\"light.night_light\",\"brightness\":\"{{brightness}}\"}","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":790,"y":1456,"wires":[[]]},{"id":"84b16be7.511d68","type":"function","z":"fac037bf.a42d78","name":"Increment","func":"const step = 45;\nconst brightness = msg.payload === \"off\" ? 5 : Math.min(parseInt(msg.data.attributes.brightness) + step, 255);\n\nmsg.payload = {\n    data: {\n        brightness: brightness\n    }\n};\n\nreturn [msg, brightness === 255 ? null : 0];","outputs":2,"noerr":0,"x":604,"y":1456,"wires":[["98c6d742.6646b8"],["36420a4b.f3b0d6"]]},{"id":"97679116.88dfc","type":"api-current-state","z":"fac037bf.a42d78","name":"Night Light","version":1,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"light.night_light","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":454,"y":1456,"wires":[["84b16be7.511d68"]]},{"id":"36420a4b.f3b0d6","type":"delay","z":"fac037bf.a42d78","name":"","pauseType":"delay","timeout":"3","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":796,"y":1504,"wires":[["97679116.88dfc"]]},{"id":"c47220ca.eb63f","type":"inject","z":"fac037bf.a42d78","name":"Pushed","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":274,"y":1456,"wires":[["97679116.88dfc"]]},{"id":"27bafe1.957ce02","type":"inject","z":"fac037bf.a42d78","name":"Released","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":284,"y":1504,"wires":[["45494507.3c090c"]]},{"id":"45494507.3c090c","type":"change","z":"fac037bf.a42d78","name":"","rules":[{"t":"set","p":"reset","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":464,"y":1504,"wires":[["36420a4b.f3b0d6"]]}]

edit: the code is actually increasing the brightness but should be easy enough to swap around.

2 Likes

Hello, sorry, I misunderstood something. Can not help you with your problem … Interested me too !!! I wish you success