35 lines
1.3 KiB
JSON
35 lines
1.3 KiB
JSON
[
|
|
{
|
|
"id": "Home mood change",
|
|
"automation": "- alias: Home mood change\n description: It call script.mood_set when input_text.home_mood change\n triggers:\n - entity_id:\n - input_text.home_mood\n to: null\n trigger: state\n - trigger: state\n entity_id:\n - automation.home_mood_change\n from: 'off'\n to: 'on'\n conditions:\n - condition: state\n entity_id: script.mood_set\n state: 'off'\n alias: This prevent possible infinite loop with mood_set\n actions:\n - action: script.mood_set\n metadata: {}\n data:\n mood: '{{ states(''input_text.home_mood'') }}'\n transition_time: 30\n mode: restart",
|
|
"config": [
|
|
{
|
|
"name": "home mood input",
|
|
"room": "home",
|
|
"type": "text",
|
|
"id": {
|
|
"entity_id": "input_text.home_mood",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "home mood change automation",
|
|
"room": "home",
|
|
"type": "automation",
|
|
"id": {
|
|
"entity_id": "automation.home_mood_change",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "mood set script",
|
|
"room": "home",
|
|
"type": "script",
|
|
"id": {
|
|
"entity_id": "script.mood_set",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
}
|
|
] |