Id like a button press on one of my scene capable homeseer dimmers to dim all lights that are currently on. I dont want to dim the light if it is not currently on. I used to do this in smartthings, but cant figure out how to do it in HA. Im specifically looking to do this in node red.
I think I got it
[{"id":"87111b5d.423eb8","type":"ha-get-entities","z":"2f95c855cb2cd6a6","name":"","server":"9405c3fe.d0a6c","version":0,"rules":[{"property":"entity_id","logic":"starts_with","value":"light.","valueType":"str"},{"property":"state","logic":"is","value":"on","valueType":"str"}],"output_type":"split","output_empty_results":false,"output_location_type":"msg","output_location":"payload","output_results_count":1,"x":410,"y":2300,"wires":[["f1234263.eed69"]]},{"id":"f1234263.eed69","type":"api-call-service","z":"2f95c855cb2cd6a6","name":"Turn on Light","server":"bb06732d.30845","version":3,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"{{payload.entity_id}}","data":"{\"brightness_pct\": \"20\"}","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":610,"y":2300,"wires":[[]]},{"id":"f8460f109c9f5160","type":"server-state-changed","z":"2f95c855cb2cd6a6","name":"Change to evening","server":"bb06732d.30845","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_select.time_of_day","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"Evening","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":200,"y":2300,"wires":[["87111b5d.423eb8"],[]]},{"id":"32dfc19fd0d43896","type":"comment","z":"2f95c855cb2cd6a6","name":"Dim Lights that are on","info":"","x":140,"y":2240,"wires":[]},{"id":"9405c3fe.d0a6c","type":"server","name":"Home Assistant Real","version":1,"legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true},{"id":"bb06732d.30845","type":"server","name":"Home Assistant","version":1,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":false,"cacheJson":true}]
1 Like