Set default level parameters dynamically

Pretty simple, in ST I used circadian lighting to adapt the default zwave and default local brightness children to control dimming in the morning/night. In HA I just have the ozw.set_parameter and potentially a helper for the dim level set by (already installed) adaptive lighting integration.

Anyone got their switches dynamically changing the local and zwave default parameters with adaptive lighting somehow? Wanting to know how to best connect the dots as I’m still pretty new to HA.

1 Like

Hey all, just wanted to post up that I FINALLY got a working solution to set default levels based on adaptive lighting component called “default levels”. I’ve tested it for a few days and it works really well. It also uses an “only if changed” rbe node to keep the z-wave traffic to a minimum. Figured I would share and solicit for improvement.

Largest bummer is that it has to use a polling node since the on/off is the only “state” that changes on the switch. I haven’t been able to figure out how to get a trigger to fire when an attribute of an entity changes:

[{“id”:“a980282e.2b4478”,“type”:“tab”,“label”:“Default Lighting Levels”,“disabled”:false,“info”:""},{“id”:“8fb229d5.b2d418”,“type”:“api-call-service”,“z”:“a980282e.2b4478”,“name”:“Set Dining Room Dimmer”,“server”:“86db4bb5.5e7458”,“version”:1,“debugenabled”:false,“service_domain”:“zwave_js”,“service”:“set_config_parameter”,“entityId”:“light.dining_room_dimmer_current_value”,“data”:"{“parameter”:"{{parameter}}",“value”:"{{value}}"}",“dataType”:“json”,“mergecontext”:"",“output_location”:"",“output_location_type”:“none”,“mustacheAltTags”:false,“x”:1510,“y”:100,“wires”:[[]]},{“id”:“97b45e5a.f00ad”,“type”:“change”,“z”:“a980282e.2b4478”,“name”:“for Dimmers Default Local”,“rules”:[{“t”:“set”,“p”:“parameter”,“pt”:“msg”,“to”:“9”,“tot”:“num”}],“action”:"",“property”:"",“from”:"",“to”:"",“reg”:false,“x”:830,“y”:480,“wires”:[[“397599e7.35b066”]]},{“id”:“1d807676.744dea”,“type”:“change”,“z”:“a980282e.2b4478”,“name”:“for Dimmers Default Z-wave”,“rules”:[{“t”:“set”,“p”:“parameter”,“pt”:“msg”,“to”:“10”,“tot”:“num”}],“action”:"",“property”:"",“from”:"",“to”:"",“reg”:false,“x”:840,“y”:560,“wires”:[[“397599e7.35b066”]]},{“id”:“f95b0ac4.2768b8”,“type”:“api-call-service”,“z”:“a980282e.2b4478”,“name”:“Set Master Hallway Dimmer”,“server”:“86db4bb5.5e7458”,“version”:1,“debugenabled”:false,“service_domain”:“zwave_js”,“service”:“set_config_parameter”,“entityId”:“light.master_hall_dimmer_current_value”,“data”:"{“parameter”:"{{parameter}}",“value”:"{{value}}"}",“dataType”:“json”,“mergecontext”:"",“output_location”:"",“output_location_type”:“none”,“mustacheAltTags”:false,“x”:1520,“y”:880,“wires”:[[]]},{“id”:“e49e7da5.3490a”,“type”:“api-call-service”,“z”:“a980282e.2b4478”,“name”:“Set Master Bathroom Dimmer”,“server”:“86db4bb5.5e7458”,“version”:1,“debugenabled”:false,“service_domain”:“zwave_js”,“service”:“set_config_parameter”,“entityId”:“light.master_bathroom_dimmer_current_value”,“data”:"{“parameter”:"{{parameter}}",“value”:"{{value}}"}",“dataType”:“json”,“mergecontext”:"",“output_location”:"",“output_location_type”:“none”,“mustacheAltTags”:false,“x”:1530,“y”:160,“wires”:[[]]},{“id”:“76b76ed7.6d776”,“type”:“api-call-service”,“z”:“a980282e.2b4478”,“name”:“Set Master Bedroom Dimmer”,“server”:“86db4bb5.5e7458”,“version”:1,“debugenabled”:false,“service_domain”:“zwave_js”,“service”:“set_config_parameter”,“entityId”:“light.master_bedroom_dimmer_current_value”,“data”:"{“parameter”:"{{parameter}}",“value”:"{{value}}"}",“dataType”:“json”,“mergecontext”:"",“output_location”:"",“output_location_type”:“none”,“mustacheAltTags”:false,“x”:1520,“y”:220,“wires”:[[]]},{“id”:“625969e1.7e0dc8”,“type”:“api-call-service”,“z”:“a980282e.2b4478”,“name”:“Set Living Room Hallway Dimmer”,“server”:“86db4bb5.5e7458”,“version”:1,“debugenabled”:false,“service_domain”:“zwave_js”,“service”:“set_config_parameter”,“entityId”:“light.living_room_hallway_dimmer_current_value”,“data”:"{“parameter”:"{{parameter}}",“value”:"{{value}}"}",“dataType”:“json”,“mergecontext”:"",“output_location”:"",“output_location_type”:“none”,“mustacheAltTags”:false,“x”:1540,“y”:280,“wires”:[[]]},{“id”:“6f9012f7.8caf3c”,“type”:“api-call-service”,“z”:“a980282e.2b4478”,“name”:“Set Dining Room Track Dimmer”,“server”:“86db4bb5.5e7458”,“version”:1,“debugenabled”:false,“service_domain”:“zwave_js”,“service”:“set_config_parameter”,“entityId”:“light.dining_room_track_dimmer_current_value”,“data”:"{“parameter”:"{{parameter}}",“value”:"{{value}}"}",“dataType”:“json”,“mergecontext”:"",“output_location”:"",“output_location_type”:“none”,“mustacheAltTags”:false,“x”:1530,“y”:340,“wires”:[[]]},{“id”:“e46a69d3.61be08”,“type”:“api-call-service”,“z”:“a980282e.2b4478”,“name”:“Set Dining Room Dimmer”,“server”:“86db4bb5.5e7458”,“version”:1,“debugenabled”:false,“service_domain”:“zwave_js”,“service”:“set_config_parameter”,“entityId”:“light.dining_room_dimmer_current_value”,“data”:"{“parameter”:"{{parameter}}",“value”:"{{value}}"}",“dataType”:“json”,“mergecontext”:"",“output_location”:"",“output_location_type”:“none”,“mustacheAltTags”:false,“x”:1510,“y”:400,“wires”:[[]]},{“id”:“9b5a0021.a5238”,“type”:“api-call-service”,“z”:“a980282e.2b4478”,“name”:“Set Living Room Entry Dimmer”,“server”:“86db4bb5.5e7458”,“version”:1,“debugenabled”:false,“service_domain”:“zwave_js”,“service”:“set_config_parameter”,“entityId”:“light.living_room_entry_dimmer_current_value”,“data”:"{“parameter”:"{{parameter}}",“value”:"{{value}}"}",“dataType”:“json”,“mergecontext”:"",“output_location”:"",“output_location_type”:“none”,“mustacheAltTags”:false,“x”:1530,“y”:460,“wires”:[[]]},{“id”:“b9586f8d.171b1”,“type”:“api-call-service”,“z”:“a980282e.2b4478”,“name”:“Set Living Room Dimmer”,“server”:“86db4bb5.5e7458”,“version”:1,“debugenabled”:false,“service_domain”:“zwave_js”,“service”:“set_config_parameter”,“entityId”:“light.living_room_dimmer_current_value”,“data”:"{“parameter”:"{{parameter}}",“value”:"{{value}}"}",“dataType”:“json”,“mergecontext”:"",“output_location”:"",“output_location_type”:“none”,“mustacheAltTags”:false,“x”:1510,“y”:520,“wires”:[[]]},{“id”:“a8433b92.2825c8”,“type”:“api-call-service”,“z”:“a980282e.2b4478”,“name”:“Set Upstairs Main Hall Dimmer”,“server”:“86db4bb5.5e7458”,“version”:1,“debugenabled”:false,“service_domain”:“zwave_js”,“service”:“set_config_parameter”,“entityId”:“light.upstairs_main_hall_dimmer_current_value”,“data”:"{“parameter”:"{{parameter}}",“value”:"{{value}}"}",“dataType”:“json”,“mergecontext”:"",“output_location”:"",“output_location_type”:“none”,“mustacheAltTags”:false,“x”:1530,“y”:580,“wires”:[[]]},{“id”:“5d2e345b.34c9ec”,“type”:“api-call-service”,“z”:“a980282e.2b4478”,“name”:“Set Upstairs Hallway Dimmer”,“server”:“86db4bb5.5e7458”,“version”:1,“debugenabled”:false,“service_domain”:“zwave_js”,“service”:“set_config_parameter”,“entityId”:“light.upstairs_hallway_dimmer_current_value”,“data”:"{“parameter”:"{{parameter}}",“value”:"{{value}}"}",“dataType”:“json”,“mergecontext”:"",“output_location”:"",“output_location_type”:“none”,“mustacheAltTags”:false,“x”:1520,“y”:640,“wires”:[[]]},{“id”:“19b921da.8ef03e”,“type”:“api-call-service”,“z”:“a980282e.2b4478”,“name”:“Set Guest Bathroom Dimmer”,“server”:“86db4bb5.5e7458”,“version”:1,“debugenabled”:false,“service_domain”:“zwave_js”,“service”:“set_config_parameter”,“entityId”:“light.guest_bathroom_dimmer_current_value”,“data”:"{“parameter”:"{{parameter}}",“value”:"{{value}}"}",“dataType”:“json”,“mergecontext”:"",“output_location”:"",“output_location_type”:“none”,“mustacheAltTags”:false,“x”:1520,“y”:700,“wires”:[[]]},{“id”:“370a48e8.03f408”,“type”:“api-call-service”,“z”:“a980282e.2b4478”,“name”:“Set Guest Bathroom Shower Dimmer”,“server”:“86db4bb5.5e7458”,“version”:1,“debugenabled”:false,“service_domain”:“zwave_js”,“service”:“set_config_parameter”,“entityId”:“light.guest_bathroom_shower_dimmer_current_value”,“data”:"{“parameter”:"{{parameter}}",“value”:"{{value}}"}",“dataType”:“json”,“mergecontext”:"",“output_location”:"",“output_location_type”:“none”,“mustacheAltTags”:false,“x”:1550,“y”:760,“wires”:[[]]},{“id”:“53e0658.15b269c”,“type”:“api-call-service”,“z”:“a980282e.2b4478”,“name”:“Set Guest Bathroom Sconces Dimmer”,“server”:“86db4bb5.5e7458”,“version”:1,“debugenabled”:false,“service_domain”:“zwave_js”,“service”:“set_config_parameter”,“entityId”:“light.guest_bathroom_sconces_dimmer_current_value”,“data”:"{“parameter”:"{{parameter}}",“value”:"{{value}}"}",“dataType”:“json”,“mergecontext”:"",“output_location”:"",“output_location_type”:“none”,“mustacheAltTags”:false,“x”:1550,“y”:820,“wires”:[[]]},{“id”:“397599e7.35b066”,“type”:“split”,“z”:“a980282e.2b4478”,“name”:"",“splt”:"\n",“spltType”:“str”,“arraySplt”:1,“arraySpltType”:“len”,“stream”:false,“addname”:"",“x”:1090,“y”:480,“wires”:[[“8fb229d5.b2d418”,“e49e7da5.3490a”,“76b76ed7.6d776”,“625969e1.7e0dc8”,“6f9012f7.8caf3c”,“e46a69d3.61be08”,“9b5a0021.a5238”,“b9586f8d.171b1”,“a8433b92.2825c8”,“5d2e345b.34c9ec”,“19b921da.8ef03e”,“370a48e8.03f408”,“53e0658.15b269c”,“f95b0ac4.2768b8”]]},{“id”:“df4b7f5b.f9405”,“type”:“comment”,“z”:“a980282e.2b4478”,“name”:“Fan/Light Light”,“info”:"",“x”:1520,“y”:1000,“wires”:[]},{“id”:“22c88ced.46c2f4”,“type”:“api-call-service”,“z”:“a980282e.2b4478”,“name”:“Set Guest Bedroom Light”,“server”:“86db4bb5.5e7458”,“version”:1,“debugenabled”:false,“service_domain”:“zwave_js”,“service”:“set_config_parameter”,“entityId”:“light.guest_bedroom_light_current_value”,“data”:"{“parameter”:"{{parameter}}",“value”:"{{value}}"}",“dataType”:“json”,“mergecontext”:"",“output_location”:"",“output_location_type”:“none”,“mustacheAltTags”:false,“x”:1520,“y”:1080,“wires”:[[]]},{“id”:“563f9ec1.7a39a”,“type”:“api-call-service”,“z”:“a980282e.2b4478”,“name”:“Set Living Room Light”,“server”:“86db4bb5.5e7458”,“version”:1,“debugenabled”:false,“service_domain”:“zwave_js”,“service”:“set_config_parameter”,“entityId”:“light.living_room_light_current_value”,“data”:"{“parameter”:"{{parameter}}",“value”:"{{value}}"}",“dataType”:“json”,“mergecontext”:"",“output_location”:"",“output_location_type”:“none”,“mustacheAltTags”:false,“x”:1510,“y”:1140,“wires”:[[]]},{“id”:“5f10e2f8.a91e2c”,“type”:“api-call-service”,“z”:“a980282e.2b4478”,“name”:“Set Kendrick Light”,“server”:“86db4bb5.5e7458”,“version”:1,“debugenabled”:false,“service_domain”:“zwave_js”,“service”:“set_config_parameter”,“entityId”:“light.kendrick_bedroom_light_current_value”,“data”:"{“parameter”:"{{parameter}}",“value”:"{{value}}"}",“dataType”:“json”,“mergecontext”:"",“output_location”:"",“output_location_type”:“none”,“mustacheAltTags”:false,“x”:1500,“y”:1200,“wires”:[[]]},{“id”:“8909f930.774b88”,“type”:“split”,“z”:“a980282e.2b4478”,“name”:"",“splt”:"\n",“spltType”:“str”,“arraySplt”:1,“arraySpltType”:“len”,“stream”:false,“addname”:"",“x”:1090,“y”:1080,“wires”:[[“22c88ced.46c2f4”,“563f9ec1.7a39a”,“5f10e2f8.a91e2c”]]},{“id”:“7edb80dc.1d9b7”,“type”:“change”,“z”:“a980282e.2b4478”,“name”:“for Fan/Light Light Default Local”,“rules”:[{“t”:“set”,“p”:“parameter”,“pt”:“msg”,“to”:“12”,“tot”:“num”}],“action”:"",“property”:"",“from”:"",“to”:"",“reg”:false,“x”:860,“y”:1080,“wires”:[[“8909f930.774b88”]]},{“id”:“c908a988.a55948”,“type”:“change”,“z”:“a980282e.2b4478”,“name”:“for Fan/Light Light Default Z-wave”,“rules”:[{“t”:“set”,“p”:“parameter”,“pt”:“msg”,“to”:“13”,“tot”:“num”}],“action”:"",“property”:"",“from”:"",“to”:"",“reg”:false,“x”:870,“y”:1160,“wires”:[[“8909f930.774b88”]]},{“id”:“d1cac810.6713c8”,“type”:“comment”,“z”:“a980282e.2b4478”,“name”:“Dimmers”,“info”:"",“x”:1500,“y”:40,“wires”:[]},{“id”:“b71b80fa.f25e2”,“type”:“debug”,“z”:“a980282e.2b4478”,“name”:"",“active”:true,“tosidebar”:true,“console”:false,“tostatus”:false,“complete”:“value”,“targetType”:“msg”,“statusVal”:"",“statusType”:“auto”,“x”:1010,“y”:120,“wires”:[]},{“id”:“63b6f51e.8d235c”,“type”:“change”,“z”:“a980282e.2b4478”,“name”:"",“rules”:[{“t”:“set”,“p”:“value”,“pt”:“msg”,“to”:“data.attributes.brightness_pct”,“tot”:“msg”}],“action”:"",“property”:"",“from”:"",“to”:"",“reg”:false,“x”:200,“y”:240,“wires”:[[“e0744d53.92f9b”]]},{“id”:“272052b1.1f615e”,“type”:“change”,“z”:“a980282e.2b4478”,“name”:"",“rules”:[{“t”:“change”,“p”:“value”,“pt”:“msg”,“from”:“100”,“fromt”:“num”,“to”:“99”,“tot”:“num”}],“action”:"",“property”:"",“from”:"",“to”:"",“reg”:false,“x”:530,“y”:240,“wires”:[[“b71b80fa.f25e2”,“f300bac.e67db48”]]},{“id”:“e0744d53.92f9b”,“type”:“function”,“z”:“a980282e.2b4478”,“name”:"",“func”:“msg.value = Math.round(msg.value)\nreturn msg;”,“outputs”:1,“noerr”:0,“initialize”:"",“finalize”:"",“libs”:[],“x”:360,“y”:240,“wires”:[[“272052b1.1f615e”]]},{“id”:“779de8c1.e73bf8”,“type”:“poll-state”,“z”:“a980282e.2b4478”,“name”:“Default Level Switch”,“server”:“86db4bb5.5e7458”,“version”:1,“exposeToHomeAssistant”:false,“haConfig”:[{“property”:“name”,“value”:""},{“property”:“icon”,“value”:""}],“updateinterval”:“5”,“updateIntervalUnits”:“minutes”,“outputinitially”:true,“outputonchanged”:true,“entity_id”:“switch.adaptive_lighting_default_levels”,“state_type”:“str”,“halt_if”:“on”,“halt_if_type”:“str”,“halt_if_compare”:“is”,“outputs”:2,“x”:130,“y”:80,“wires”:[[“63b6f51e.8d235c”,“57eb3ce9.468d64”],[]]},{“id”:“57eb3ce9.468d64”,“type”:“debug”,“z”:“a980282e.2b4478”,“name”:"",“active”:false,“tosidebar”:true,“console”:false,“tostatus”:false,“complete”:“true”,“targetType”:“full”,“statusVal”:"",“statusType”:“auto”,“x”:640,“y”:120,“wires”:[]},{“id”:“f300bac.e67db48”,“type”:“rbe”,“z”:“a980282e.2b4478”,“name”:“Is Changed?”,“func”:“rbe”,“gap”:"",“start”:"",“inout”:“out”,“septopics”:true,“property”:“value”,“x”:510,“y”:340,“wires”:[[“97b45e5a.f00ad”,“1d807676.744dea”,“7edb80dc.1d9b7”,“c908a988.a55948”]]},{“id”:“86db4bb5.5e7458”,“type”:“server”,“name”:“Home Assistant”,“addon”:true}]

1 Like