Node-Red flow examples

@jaburges Hi! I am curious about how you solved the message part for iOS notify. The Hastebin link seemed empty. Appreciate if you would post it again. I am thinking of combining jinja template sensor for last motion, camera and notify.

Maybe someone can help…
I want my lights start flashing when my alarm triggers. I’ve made two scenes.
“Alarmlights on” and “alarmlights off” and put a delay between them so it will loop.
I have no idea how to stop the loop.

I have to hold all states when i disarm the alarm and put this after “alarmlights on”, but i don’t no if this possible and how.

Thanks for the help!

you could make an input boolea ( https://www.home-assistant.io/components/input_boolean/ ) triggered by the alarm. then you put a node in the lopp that check the status of the boolean? :slight_smile:

1 Like

How do you tell what the message is going to be? I love this example, but I would love to include a notification when one of my devices is offline… I know I can use the “online” binary sensor, but how do you parse out the message as you have done above? How would I know ahead of time what I should expect message-wise?

After your off node place an Current State node that checks the current state of your alarm. If the alarm is still activated loop back to your delay node. If not, exit the loop.

The input Boolean dit the job. I turn the input boolean on when the alarm is triggered so the loop will start. When is disarm my alarm the input boolean is going to off so the loop stops.

Maybe someone can help with another problem.
I want to turn on my lights in the evening (scene not home) when I leave the home or (scene home) when I’m coming home. The lights need to go on with an offset based on the sun -15.
I have it working just based on the sun trigger below and above horizon, but i don’t know which node I can use for an offset.

1 Like

Sometimes it’s so simple :see_no_evil:

Thanks

Hello everyone,
I’m new in home assistant and I’m trying to set my first flow in node red and this should be very easy but I’m a noob at this
my idea is to open my blinds during day when I’m home and close when I leave or after sunset. I have a tubular motor with sonoff dual tasmotized.

Thanks for the help

Hello again after a LOT of trial and error I managed to get my first flow working, I’m open to sugestions on how to improve it but I belive its working,
Hope it can help inexperienced guys like me,

The goal is to open my roller shutter when I arrive home if its between 8AM or 8PM, and close it if I leave home, should also open it at 8AM if anyone is home, and close it at 8PM.

[{"id":"6e7c66f8.eb4cf8","type":"api-call-service","z":"c4466fff.4bb8","name":"close roller shutter","server":"95304ac6.bfca28","service_domain":"switch","service":"turn_on","data":"{\"entity_id\":\"switch.descer_estores\"}","mergecontext":"","output_location":"","output_location_type":"none","x":1150,"y":320,"wires":[[]]},{"id":"95304ac6.bfca28","type":"server","z":"","name":"Home Assistant"}]

Don’t know why, but in the node to get the state home or away for the automation in the morning/night it only work when I placed “halt if home” and did not work at all if “halt if not home” why is that?

it may be easier to use ‘eztimer’ palette as you can easily set on/off state of the node based on time (or sunset etc).
then a simpler flow is the eztimer node on then continue to shut the roller?

I would suggest two flows.

  1. Simple presence (we use android devices and google maps)
    A. Input_boolean (for each person/device you want to trigger presence) (i.e. Mom_home or dad_home)
    B. input_boolean = House Occupied (turned on via node-red when any person is home (see The HookUp video talking about presence for the flow)
  2. Trigger your actions using a bigtimer for when to be open or close, then use current_state node with a halt if action to stop when your conditions aren’t met.

This should server you very well. Besides then you can use your presence detection in other flows also. I’d be happy to share more of this, as I use these flows myself and have 4 people tracked in our house plus guests.

I have been using HA for a little while and it is been very useful. Primarily for the multi-vendor integration. For example, I have outside flood lights on a Shelly1, and two seperate outdoor carriage lights on individual wemo wall switches. Neither Shelly or Wemo (Belkin) have any way to tie the two together. I also prefer little or no cloud usage. HA to the rescue.

Anyway, my current task to solve is “wake-lights”. I have several Philips Hue multi-color bulbs. For various reasons I can share in another post, I didn’t have a use for them until now. They are in simple floor/desk fixtures/lamps. I want to trigger them to turn on (slowly increase brightness/set color over 5 minutes). I would like this to be triggered by an alarm or schedule (big timer?, light scheduler?) I got light scheduler to work. However, (THE PROBLEM), I would like the schedule/trigger to only occur if that individual is home (I already have presence working with booleans in HA for each person.

I cannot seem to get this working. I should mention, that I want to do this in node-red and currently use version v0.20.5.
Can someone please offer some thoughts or ideas, or assistance?

Thanks in advance.

CJ

Thanks for your reply, maybe on other flow I’ll try to check the eztimer palette, the main problem was that i only wanted to open the windows if it was during day and if someone was home, and open and close when we arrive/leave during day
For now, on this flow because it just work perfectly I will just leave it as it is

Hello, thanks for your feedback,

I use BLE and wifi presence detection through home assistant, and then a group for all the people that are tracked, you think it would be better to do it with input booleans?
tried to use bigtimer but couldn’t figure it out, so just used the time range node, can you share the config for the bigtimer node in a similiar use
because this flow just work probably will not change it, if ain’t broken don’t fix it.
Good luck with your “wake-lights”

Here’s how I do alarm clock. I have an input_datetime to schedule the alarm using the HA UI.

OR I can schedule on my personal calendar, which only runs if I’m home. Could set this up per-user.

I just use the caldav integration for calendar. When the calendar entity turns to ‘on’, run the alarm sequence for whatever you want (fade in lights etc).

calendar:
  - platform: caldav
    username: !secret caldav_user
    password: !secret caldav_pass
    url: !secret caldav_url
    custom_calendars:
      - name: 'Brad Scheduled Alarm'
        calendar: 'Personal'
        search: 'Alarm'

Thanks for all the great ideas and flows! Here is a small contribution that i have been working on.

This allows you to say Alexa turn off the lamp to the living room echo
and only the lamp in the living room turn on. But say the same command
from the bedroom and only the lamp in the bedroom will turn on.
Works similar to using the context aware groups in the alexa app
and saying turn on or off the lights, except no cloud processing so much
faster response and can be applied to
locks, lights, lamps, doors anything really.

Enjoy!

[{"id":"9026737c.f80b3","type":"alexa-local","z":"a2b15e8b.e2456","devicename":"Br lmp","inputtrigger":true,"x":150,"y":1560,"wires":[["927904e.473f7f8","160a3941.f25ff7"]]},{"id":"bfa9c757.3e9c78","type":"alexa-local","z":"a2b15e8b.e2456","devicename":"chr lmp","inputtrigger":true,"x":140,"y":1640,"wires":[["9dda15d7.c66768","160a3941.f25ff7"]]},{"id":"927904e.473f7f8","type":"api-current-state","z":"a2b15e8b.e2456","name":"Last Alexa is\" Bedroom \"","server":"c5c66771.d1eb38","version":1,"outputs":2,"halt_if":"media_player.master_bedroom","halt_if_type":"str","halt_if_compare":"is","override_topic":true,"entity_id":"sensor.last_alexa","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":330,"y":1520,"wires":[["160a3941.f25ff7"],[]]},{"id":"160a3941.f25ff7","type":"switch","z":"a2b15e8b.e2456","name":"Echo, Dot Entity Id","property":"payload","propertyType":"msg","rules":[{"t":"regex","v":"media_player.master_bedroom","vt":"str","case":false},{"t":"regex","v":"media_player.front_room","vt":"str","case":false}],"checkall":"true","repair":false,"outputs":2,"x":570,"y":1600,"wires":[["1b924ec1.a882b1"],["4526517b.0c798"]]},{"id":"6dfa40e6.41d2b","type":"api-call-service","z":"a2b15e8b.e2456","name":"Shelbys Chair Lamp-- \" Off \"","server":"c5c66771.d1eb38","service_domain":"light","service":"turn_off","data":"{\"entity_id\":\"light.shelbys_chair_lamp\"}","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":960,"y":1640,"wires":[[]]},{"id":"1b924ec1.a882b1","type":"switch","z":"a2b15e8b.e2456","name":"on / off ","property":"bri","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"str"},{"t":"gte","v":"1","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":770,"y":1560,"wires":[["cf99d123.f456c"],["37973388.0d3bdc"]]},{"id":"9dda15d7.c66768","type":"api-current-state","z":"a2b15e8b.e2456","name":"Last Alexa is\" Living Room\"","server":"c5c66771.d1eb38","version":1,"outputs":2,"halt_if":"media_player.front_room","halt_if_type":"str","halt_if_compare":"is","override_topic":true,"entity_id":"sensor.last_alexa","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":340,"y":1680,"wires":[["160a3941.f25ff7"],[]]},{"id":"69ef35df.e46c5c","type":"api-call-service","z":"a2b15e8b.e2456","name":"Shelbys Chair Lamp-- \" On \"","server":"c5c66771.d1eb38","service_domain":"light","service":"turn_on","data":"{\"entity_id\":\"light.shelbys_chair_lamp\"}","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":960,"y":1700,"wires":[[]]},{"id":"37973388.0d3bdc","type":"api-call-service","z":"a2b15e8b.e2456","name":"Shelbys Bedside Lamp-- \" On\"","server":"c5c66771.d1eb38","service_domain":"light","service":"turn_on","data":"{\"entity_id\":\"light.shelbys_bedside_lamp\"}","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":970,"y":1580,"wires":[[]]},{"id":"cf99d123.f456c","type":"api-call-service","z":"a2b15e8b.e2456","name":"Shelbys Bedside Lamp-- \" Off \"","server":"c5c66771.d1eb38","service_domain":"light","service":"turn_off","data":"{\"entity_id\":\"light.shelbys_bedside_lamp\"}","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":970,"y":1520,"wires":[[]]},{"id":"4526517b.0c798","type":"switch","z":"a2b15e8b.e2456","name":"on / off ","property":"bri","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"str"},{"t":"gte","v":"1","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":770,"y":1660,"wires":[["6dfa40e6.41d2b"],["69ef35df.e46c5c"]]},{"id":"218bbd57.4764c2","type":"comment","z":"a2b15e8b.e2456","name":"Control Lamps, Locks, Etc... Based on Last Alexa Spoken to LOCAL NO CLOUD","info":"Request is called from echo \"alexa turn off the lamp\"\nAlexa local node fires into the Last Alexa Call Service Node\nWhere the echo spoken to is determined and sent out to the\n\"echo entity id\"  switch node\nAlexa local node also fires into the \"echo entity id\"  switch node\nwith the msg.bri value (100 for on and 0 for off, no dimming yet)\nOnly the echo entity id spoken to passes the msg.bri value \nout to the on / off switch node where 0 for off or 100 for on  \nis sent to the lamp on or lamp off call service node respectivly.\n\nThis allows you to say Alexa turn off the lamp to the living room echo \nand only the lamp in the living room turn on. But say the same command \nfrom the bedroom and only the lamp in the bedroom will turn on.\nWorks similar to useing the context aware groups in the alexa app \nand saying turn on or off the lights, except no cloud processing so much \nfaster responce and can be applied to \nlocks, lights, lamps, doors anything really.\n\nEnjoy!\n\n","x":620,"y":1440,"wires":[]},{"id":"c5c66771.d1eb38","type":"server","z":"","name":"Posting Server","legacy":false,"hassio":false,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true}]
1 Like

Here is a small example of how I use my Lutron Pico remotes in Node-RED to control non-lutron lights (zigbee and z-wave lights). I’m using the Lutron Pro hub which exposed the remote buttons as sensors (using the custom component). Using the buttons was easy for calling events, but I wanted the brighten and dim buttons to work with holds like they do with Lutron switches:

The brighten and dim events call a 250ms loop that checks the button status and calls it again if the button is still held, the fires the level change command again.

You can change the steps for the brightness as well as the minimum and maximum brightness in the brighten or dim nodes.

pico_remote.json

[{"id":"9ce48951.f648a8","type":"server-state-changed","z":"cf4e273e.d72598","name":"Pico ON","server":"b3217b27.630be8","version":1,"entityidfilter":"sensor.master_bedroom_pico","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"1","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":140,"y":100,"wires":[["f6e76419.ba49b8"],[]]},{"id":"b9f6cd2f.5618","type":"server-state-changed","z":"cf4e273e.d72598","name":"Pico UP","server":"b3217b27.630be8","version":1,"entityidfilter":"sensor.master_bedroom_pico","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"8","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":false,"x":140,"y":140,"wires":[["43e40cfb.92b664"],[]]},{"id":"e4f2a2d5.abd0d","type":"server-state-changed","z":"cf4e273e.d72598","name":"MIDDLE","server":"b3217b27.630be8","version":1,"entityidfilter":"sensor.master_bedroom_pico","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"2","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":140,"y":180,"wires":[["29083b07.59cda4"],[]]},{"id":"894a63a9.12fb7","type":"server-state-changed","z":"cf4e273e.d72598","name":"Pico DOWN","server":"b3217b27.630be8","version":1,"entityidfilter":"sensor.master_bedroom_pico","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"16","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":false,"x":150,"y":220,"wires":[["1095e7f0.facfd8"],[]]},{"id":"3fb877df.4d1068","type":"server-state-changed","z":"cf4e273e.d72598","name":"Pico OFF","server":"b3217b27.630be8","version":1,"entityidfilter":"sensor.master_bedroom_pico","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"4","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":140,"y":260,"wires":[["3d849107.074ace"],[]]},{"id":"f6e76419.ba49b8","type":"api-call-service","z":"cf4e273e.d72598","name":"Ikea Night Light ON","server":"b3217b27.630be8","service_domain":"light","service":"turn_on","data":"{\"entity_id\":\"light.ikea_night_light\"}","mergecontext":"","output_location":"","output_location_type":"none","x":530,"y":100,"wires":[[]]},{"id":"3d849107.074ace","type":"api-call-service","z":"cf4e273e.d72598","name":"Ikea Night Light OFF","server":"b3217b27.630be8","service_domain":"light","service":"turn_off","data":"{\"entity_id\":\"light.ikea_night_light\"}","mergecontext":"","output_location":"","output_location_type":"none","x":540,"y":260,"wires":[[]]},{"id":"753670eb.f2772","type":"api-call-service","z":"cf4e273e.d72598","name":"Ikea Night Light UP","server":"b3217b27.630be8","service_domain":"light","service":"turn_on","data":"{\"entity_id\":\"light.ikea_night_light\",\"brightness\":\"{{payload}}\"}","mergecontext":"","output_location":"","output_location_type":"none","x":530,"y":140,"wires":[[]]},{"id":"e93c39ae.4f8b78","type":"api-call-service","z":"cf4e273e.d72598","name":"Ikea Night Light DOWN","server":"b3217b27.630be8","service_domain":"light","service":"turn_on","data":"{\"entity_id\":\"light.ikea_night_light\",\"brightness\":\"{{payload}}\"}","mergecontext":"","output_location":"","output_location_type":"none","x":550,"y":220,"wires":[[]]},{"id":"29083b07.59cda4","type":"api-call-service","z":"cf4e273e.d72598","name":"Ikea Night Light ON","server":"b3217b27.630be8","service_domain":"light","service":"turn_on","data":"{\"entity_id\":\"light.ikea_night_light\",\"brightness_pct\":\"20\"}","mergecontext":"","output_location":"","output_location_type":"none","x":530,"y":180,"wires":[[]]},{"id":"43e40cfb.92b664","type":"api-render-template","z":"cf4e273e.d72598","name":"Brighten","server":"b3217b27.630be8","template":"{{ [255, state_attr('light.ikea_night_light', 'brightness')|int(0) + 26]|min }}","resultsLocation":"payload","resultsLocationType":"msg","templateLocation":"template","templateLocationType":"msg","x":320,"y":140,"wires":[["753670eb.f2772","6f7693a8.c8334c"]]},{"id":"1095e7f0.facfd8","type":"api-render-template","z":"cf4e273e.d72598","name":"Dim","server":"b3217b27.630be8","template":"{{ [10, state_attr('light.ikea_night_light', 'brightness')|int(0) - 26]|max|int }}","resultsLocation":"payload","resultsLocationType":"msg","templateLocation":"template","templateLocationType":"msg","x":310,"y":220,"wires":[["e93c39ae.4f8b78","1c02f221.a2aa5e"]]},{"id":"8144f2b.7be6a1","type":"comment","z":"cf4e273e.d72598","name":"Master Bedroom Pico","info":"","x":180,"y":60,"wires":[]},{"id":"159407fd.3ba328","type":"api-current-state","z":"cf4e273e.d72598","name":"detect hold","server":"b3217b27.630be8","version":1,"outputs":2,"halt_if":"0","halt_if_type":"str","halt_if_compare":"is_not","override_topic":false,"entity_id":"sensor.master_bedroom_pico","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":670,"y":40,"wires":[["43e40cfb.92b664"],[]]},{"id":"6f7693a8.c8334c","type":"delay","z":"cf4e273e.d72598","name":"250ms delay","pauseType":"delay","timeout":"250","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":510,"y":40,"wires":[["159407fd.3ba328"]]},{"id":"669a2493.0e14cc","type":"api-current-state","z":"cf4e273e.d72598","name":"detect hold","server":"b3217b27.630be8","version":1,"outputs":2,"halt_if":"0","halt_if_type":"str","halt_if_compare":"is_not","override_topic":false,"entity_id":"sensor.master_bedroom_pico","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":670,"y":320,"wires":[["1095e7f0.facfd8"],[]]},{"id":"1c02f221.a2aa5e","type":"delay","z":"cf4e273e.d72598","name":"250ms delay","pauseType":"delay","timeout":"250","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":510,"y":320,"wires":[["669a2493.0e14cc"]]},{"id":"b3217b27.630be8","type":"server","z":"","name":"Home Assistant","legacy":false,"hassio":false,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true}]

I really like how wallpanel is not just showing the UI but also part of my home assistant setup. here are 2 flows linked. first one, when a face is detected by the tablet’s camera, sends it to microsoft azure for recognition. I am using throttle because azure has api call limit.

[{"id":"8ffcc6f5.02a8a8","type":"trigger-state","z":"f56a3748.ec2fc8","name":"face detected","server":"e447d17a.16a64","entityid":"binary_sensor.wallpane_face_detection","entityidfiltertype":"exact","debugenabled":false,"constraints":[{"id":"kif29djc5g","targetType":"this_entity","targetValue":"","propertyType":"current_state","propertyValue":"new_state.state","comparatorType":"is","comparatorValueDatatype":"str","comparatorValue":"on"}],"constraintsmustmatch":"all","outputs":2,"customoutputs":[],"outputinitially":false,"state_type":"str","x":100,"y":440,"wires":[["c66664f9.cd4728"],[]]},{"id":"e7e10a62.d518c8","type":"api-call-service","z":"f56a3748.ec2fc8","name":"scan face","server":"e447d17a.16a64","service_domain":"image_processing","service":"scan","data":"{\"entity_id\":\"image_processing.microsoftface_wallpanel_camera\"}","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":480,"y":440,"wires":[[]]},{"id":"c66664f9.cd4728","type":"throttle","z":"f56a3748.ec2fc8","name":"","throttleType":"time","timeLimit":"10","timeLimitType":"seconds","countLimit":0,"blockSize":0,"locked":false,"x":300,"y":440,"wires":[["e7e10a62.d518c8"]]},{"id":"e447d17a.16a64","type":"server","z":"","name":"Home Assistant","legacy":false,"hassio":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":false}]

and the second flow send command to tablet to speak. if it is in the morning (when I am leaving home), tells me the weather (multiple dark sky sensors) and in the afternoon (when I arrive home) tells me what is the average temp at home and how many steps (google fit step count) I did today.

[{"id":"2ec70ea3.8d3842","type":"function","z":"f56a3748.ec2fc8","name":"weather text","func":"varName = msg.name\nvarSummary = msg.payload.state[\"sensor.dark_sky_summary_0d\"]\nvarHourlySummary = msg.payload.state[\"sensor.dark_sky_hourly_summary\"]\nvarTemp = msg.payload.state[\"sensor.dark_sky_temperature\"]\nvarTempHigh = msg.payload.state[\"sensor.dark_sky_daytime_high_temperature_0d\"]\nvarPercipProb = msg.payload.state[\"sensor.dark_sky_precip_probability_0d\"]\n\nmsg.payload = {}\nmsg.payload.speak = \"Good morning \"+ varName +\". The weather is \" + \nvarSummary + \" \" + varHourlySummary + \" Currently it is \" + varTemp + \n\" degree celcius, maximum temperature will be \" + varTempHigh + \" and \" + \nvarPercipProb + \" percent chance of rain.\"\n\nreturn msg;","outputs":1,"noerr":0,"x":990,"y":520,"wires":[["66b2ebc4.856504"]]},{"id":"7d46b9bf.b6c508","type":"ha-get-entities","z":"f56a3748.ec2fc8","server":"e447d17a.16a64","name":"weather sensors","rules":[{"property":"entity_id","logic":"starts_with","value":"sensor.dark_sky","valueType":"str"}],"output_type":"split","output_empty_results":false,"output_location_type":"msg","output_location":"payload","output_results_count":1,"x":630,"y":580,"wires":[["6ff775ba.ecb54c"]]},{"id":"6ff775ba.ecb54c","type":"join","z":"f56a3748.ec2fc8","name":"","mode":"custom","build":"object","property":"payload.state","propertyType":"msg","key":"payload.entity_id","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"num","reduceFixup":"","x":830,"y":560,"wires":[["2ec70ea3.8d3842"]]},{"id":"af057a45.c8ab48","type":"time-range-switch","z":"f56a3748.ec2fc8","name":"","lat":"52.30808","lon":"4.94386","startTime":"07:00","endTime":"12:00","startOffset":0,"endOffset":0,"x":400,"y":620,"wires":[["7d46b9bf.b6c508"],["bc3db1b7.ed037"]]},{"id":"6c7a044b.ac4a8c","type":"trigger-state","z":"f56a3748.ec2fc8","name":"who is this","server":"e447d17a.16a64","entityid":"image_processing.microsoftface_wallpanel_camera","entityidfiltertype":"exact","debugenabled":false,"constraints":[{"id":"19gicrnj3w3","targetType":"this_entity","targetValue":"","propertyType":"current_state","propertyValue":"new_state.state","comparatorType":"is_not","comparatorValueDatatype":"str","comparatorValue":"unknown"}],"constraintsmustmatch":"all","outputs":2,"customoutputs":[],"outputinitially":false,"state_type":"str","x":90,"y":540,"wires":[["17c38007.2e296"],[]]},{"id":"6934328f.53a7cc","type":"change","z":"f56a3748.ec2fc8","name":"face","rules":[{"t":"move","p":"payload","pt":"msg","to":"name","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":450,"y":540,"wires":[["af057a45.c8ab48"]]},{"id":"4680dfbf.385f3","type":"api-current-state","z":"f56a3748.ec2fc8","name":"temperature","server":"e447d17a.16a64","version":"1","outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"sensor.average_temperature","state_type":"str","state_location":"temperature","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":830,"y":700,"wires":[["9a810830.fef898"]]},{"id":"9a810830.fef898","type":"function","z":"f56a3748.ec2fc8","name":"home temp text","func":"varName = msg.name;\nvarTemp = msg.temperature;\nvarSteps = msg.steps;\n\nif (varSteps === null) {\n  txtSteps = \"\";\n} else {\n  txtSteps = \"You made \" + varSteps + \" steps today. Good Job!\" ;    \n}\n\nmsg.payload = {};\nmsg.payload.speak = \"Good afternoon \"+ varName +\n\". The current temperature \" + \"at home is \" + varTemp + \n\" degree celcius. \" + txtSteps;\n\nreturn msg;","outputs":1,"noerr":0,"x":1000,"y":700,"wires":[["66b2ebc4.856504"]]},{"id":"66b2ebc4.856504","type":"mqtt out","z":"f56a3748.ec2fc8","name":"speak","topic":"wallpanel/mywallpanel/command","qos":"","retain":"","broker":"ea336ecd.70b63","x":1070,"y":600,"wires":[]},{"id":"17c38007.2e296","type":"ha-wait-until","z":"f56a3748.ec2fc8","name":"wait for alarm","server":"e447d17a.16a64","outputs":2,"entityId":"alarm_control_panel.ha_alarm","property":"state","comparator":"is","value":"disarmed","valueType":"str","timeout":"200","timeoutUnits":"milliseconds","entityLocation":"","entityLocationType":"none","checkCurrentState":true,"blockInputOverrides":true,"x":280,"y":540,"wires":[["6934328f.53a7cc"],["6934328f.53a7cc"]]},{"id":"18606ab5.7b7605","type":"api-current-state","z":"f56a3748.ec2fc8","name":"steps","server":"e447d17a.16a64","version":"1","outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"sensor.google_fit_steps","state_type":"str","state_location":"steps","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":670,"y":640,"wires":[["4680dfbf.385f3"]]},{"id":"bc3db1b7.ed037","type":"switch","z":"f56a3748.ec2fc8","name":"","property":"name","propertyType":"msg","rules":[{"t":"eq","v":"me","vt":"str"},{"t":"eq","v":"wife","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":550,"y":720,"wires":[["18606ab5.7b7605"],["4680dfbf.385f3"]]},{"id":"e447d17a.16a64","type":"server","z":"","name":"Home Assistant","legacy":false,"hassio":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":false},{"id":"ea336ecd.70b63","type":"mqtt-broker","z":"","name":"home mqtt","broker":"192.168.178.15","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""}]

And the last one is for my daughter. Musical statues game :slight_smile:. I still need to move it to lovelace…

@serkank great project!!!
Can you share more about code lines?