Hello guys,
Im trying to do something.
i want to create a flow that allow announce every one when they arrive home
But my big problem is how to sent the name of the person to the template, let me know the easy way
THANKS
[
{
"id": "317411fdb938da11",
"type": "trigger-state",
"z": "cb3f5bcb753f3678",
"name": "rosa_casa",
"server": "5989b2abe6832582",
"version": 2,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityid": "device_tracker.rosa_maria",
"entityidfiltertype": "exact",
"debugenabled": false,
"constraints": [
{
"targetType": "this_entity",
"targetValue": "",
"propertyType": "previous_state",
"propertyValue": "old_state.state",
"comparatorType": "is",
"comparatorValueDatatype": "str",
"comparatorValue": "not_home"
},
{
"targetType": "this_entity",
"targetValue": "",
"propertyType": "current_state",
"propertyValue": "new_state.state",
"comparatorType": "is",
"comparatorValueDatatype": "str",
"comparatorValue": "home"
}
],
"inputs": 0,
"outputs": 2,
"customoutputs": [],
"outputinitially": false,
"state_type": "str",
"enableInput": false,
"x": 140,
"y": 440,
"wires": [
[
"47e6543d81736abc"
],
[]
]
},
{
"id": "6a8cab8849455816",
"type": "trigger-state",
"z": "cb3f5bcb753f3678",
"name": "nony_casa",
"server": "5989b2abe6832582",
"version": 2,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityid": "device_tracker.nony",
"entityidfiltertype": "exact",
"debugenabled": false,
"constraints": [
{
"targetType": "this_entity",
"targetValue": "",
"propertyType": "previous_state",
"propertyValue": "old_state.state",
"comparatorType": "is",
"comparatorValueDatatype": "str",
"comparatorValue": "not_home"
},
{
"targetType": "this_entity",
"targetValue": "",
"propertyType": "current_state",
"propertyValue": "new_state.state",
"comparatorType": "is",
"comparatorValueDatatype": "str",
"comparatorValue": "home"
}
],
"inputs": 0,
"outputs": 2,
"customoutputs": [],
"outputinitially": false,
"state_type": "str",
"enableInput": false,
"x": 140,
"y": 500,
"wires": [
[
"47e6543d81736abc"
],
[]
]
},
{
"id": "a1cbe6dd6558ada6",
"type": "trigger-state",
"z": "cb3f5bcb753f3678",
"name": "tato_casa",
"server": "5989b2abe6832582",
"version": 2,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityid": "device_tracker.tato",
"entityidfiltertype": "exact",
"debugenabled": false,
"constraints": [
{
"targetType": "this_entity",
"targetValue": "",
"propertyType": "previous_state",
"propertyValue": "old_state.state",
"comparatorType": "is",
"comparatorValueDatatype": "str",
"comparatorValue": "not_home"
},
{
"targetType": "this_entity",
"targetValue": "",
"propertyType": "current_state",
"propertyValue": "new_state.state",
"comparatorType": "is",
"comparatorValueDatatype": "str",
"comparatorValue": "home"
}
],
"inputs": 0,
"outputs": 2,
"customoutputs": [],
"outputinitially": false,
"state_type": "str",
"enableInput": false,
"x": 140,
"y": 560,
"wires": [
[
"47e6543d81736abc"
],
[]
]
},
{
"id": "47e6543d81736abc",
"type": "time-range-switch",
"z": "cb3f5bcb753f3678",
"name": "time_9_21",
"lat": "",
"lon": "",
"startTime": "09:00",
"endTime": "21:00",
"startOffset": 0,
"endOffset": 0,
"x": 350,
"y": 500,
"wires": [
[
"b36b26bfc9911d1f"
],
[]
]
},
{
"id": "b36b26bfc9911d1f",
"type": "api-render-template",
"z": "cb3f5bcb753f3678",
"name": "multiples options for tts",
"server": "5989b2abe6832582",
"version": 0,
"template": "{{ [\n\"Disculpen la molestia, pero\" ~ person + \"se esta acercando a la casa.\",\n\"Siento molestar, pero al parecer\" ~ person + \"ha entrado en el rango de la casa.\",\n\"PerdĂłn, les pido un minuto para anunciarles que\" ~ person + \"se encuentra cerca.\",\n\"DiscĂșlpenme, pero, les molesto solo para informarles que\" ~ person + \"ya se encuentra cerca a casa.\",\n\"No deseo interrumpir, pero, les comento que segun los sensores,\" ~ person + \"se encuentra cerca a la casa.\",\n\"Solo un aviso rĂĄpido, mi sentido arĂĄcnido siente la presencia de\" ~ person + \"cerca a la casa.\",\n\"Molesto solo para informarles que mi sexto sentido detecta a\" ~ person + \"cerca a casa.\",\n\"Siento interrumpir pero\" ~ person + \"ha entrado al rango de los sensores de la casa.\"\n ] | random }}",
"resultsLocation": "payload",
"resultsLocationType": "msg",
"templateLocation": "template",
"templateLocationType": "msg",
"x": 590,
"y": 500,
"wires": [
[
"f77ae485251d6642"
]
]
},
{
"id": "f77ae485251d6642",
"type": "api-call-service",
"z": "cb3f5bcb753f3678",
"name": "anuncio",
"server": "5989b2abe6832582",
"version": 5,
"debugenabled": false,
"domain": "tts",
"service": "google_translate_say",
"areaId": [],
"deviceId": [],
"entityId": [
"media_player.cuarto"
],
"data": "{\"message\":\"{{payload}}\",\"language\":\"es\"}",
"dataType": "json",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 820,
"y": 500,
"wires": [
[]
]
},
{
"id": "5989b2abe6832582",
"type": "server",
"name": "Home Assistant",
"version": 5,
"addon": false,
"rejectUnauthorizedCerts": true,
"ha_boolean": "y|yes|true|on|home|open",
"connectionDelay": true,
"cacheJson": true,
"heartbeat": false,
"heartbeatInterval": "30",
"areaSelector": "friendlyName",
"deviceSelector": "friendlyName",
"entitySelector": "friendlyName",
"statusSeparator": "at: ",
"statusYear": "hidden",
"statusMonth": "short",
"statusDay": "numeric",
"statusHourCycle": "h23",
"statusTimeFormat": "h:m",
"enableGlobalContextStore": true
}
]