101 lines
3.9 KiB
JSON
101 lines
3.9 KiB
JSON
[
|
|
{
|
|
"id": "' Coffee power plug disable at 6pm.'",
|
|
"automation": "- alias: ' Coffee power plug disable at 6pm.'\n description: ''\n triggers:\n - trigger: time\n at: '18:00:00'\n conditions:\n - condition: time\n weekday:\n - mon\n - tue\n - wed\n - thu\n - fri\n actions:\n - type: turn_off\n device_id: DEVICE_ID_HERE\n entity_id: ENTITY_ID_HERE\n domain: switch\n mode: single",
|
|
"config": [
|
|
{
|
|
"name": "coffee power plug",
|
|
"room": "kitchen",
|
|
"type": "switch",
|
|
"id": {
|
|
"entity_id": "ENTITY_ID_HERE",
|
|
"device_id": "DEVICE_ID_HERE"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "Uusi automaatio",
|
|
"automation": "- alias: Uusi automaatio\n description: ''\n triggers:\n - trigger: numeric_state\n entity_id:\n - sensor.dht11_humiditysensor\n above: 33\n conditions: []\n actions:\n - type: turn_on\n device_id: DEVICE_ID_HERE\n entity_id: ENTITY_ID_HERE\n domain: switch\n mode: single",
|
|
"config": [
|
|
{
|
|
"name": "coffee power plug",
|
|
"room": "kitchen",
|
|
"type": "switch",
|
|
"id": {
|
|
"entity_id": "ENTITY_ID_HERE",
|
|
"device_id": "DEVICE_ID_HERE"
|
|
}
|
|
},
|
|
{
|
|
"name": "dht11 humidity sensor",
|
|
"room": null,
|
|
"type": "sensor",
|
|
"id": {
|
|
"entity_id": "sensor.dht11_humiditysensor",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "mqtt-pub-coffee-maker-switch",
|
|
"automation": "- alias: mqtt-pub-coffee-maker-switch\n description: ''\n triggers:\n - entity_id:\n - switch.SWITCH_NAME\n - sensor.SENSOR_NAME\n - sensor.SENSOR_NAME\n - sensor.SENSOR_NAME\n trigger: state\n actions:\n - data:\n topic: test/topic\n payload: \"{\\n \\\"switch_state\\\": \\\"{{ states('switch.SENSOR_NAME') | default('unavailable')\\\n \\ }}\\\",\\n \\\"name\\\": \\\"coffee-maker-switch\\\",\\n \\\"entity_name\\\": \\\"switch.SENSOR_NAME\\\"\\\n ,\\n \\\"current\\\": {\\n \\\"value\\\": \\\"{{ states('sensor.SENSOR_NAME_current')\\\n \\ | default('unavailalbe') }}\\\",\\n \\\"unit\\\": \\\"Ampere\\\"\\n },\\n \\\"power\\\"\\\n : {\\n \\\"value\\\": \\\"{{ states('sensor.SENSOR_NAME_power') | default('unavailable')\\\n \\ }}\\\",\\n \\\"unit\\\": \\\"Wattage\\\"\\n },\\n \\\"voltage\\\": {\\n \\\"value\\\"\\\n : \\\"{{ states('sensor.SENSOR_NAME_voltage') | default('unavailable') }}\\\"\\\n ,\\n \\\"unit\\\": \\\"Volts\\\"\\n },\\n \\\"device_available\\\": \\\"{{ 'false' if\\\n \\ states('switch.SENSOR_NAME_1') == 'unavailable' or states('switch.SENSOR_NAME')\\\n \\ is none else 'true' }}\\\"\\n}\"\n action: mqtt.publish",
|
|
"config": [
|
|
{
|
|
"name": "switch sensor",
|
|
"room": null,
|
|
"type": "switch",
|
|
"id": {
|
|
"entity_id": "switch.SWITCH_NAME",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "sensor 1",
|
|
"room": null,
|
|
"type": "sensor",
|
|
"id": {
|
|
"entity_id": "sensor.SENSOR_NAME",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "sensor 2",
|
|
"room": null,
|
|
"type": "sensor",
|
|
"id": {
|
|
"entity_id": "sensor.SENSOR_NAME_current",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "sensor 3",
|
|
"room": null,
|
|
"type": "sensor",
|
|
"id": {
|
|
"entity_id": "sensor.SENSOR_NAME_power",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "sensor 4",
|
|
"room": null,
|
|
"type": "sensor",
|
|
"id": {
|
|
"entity_id": "sensor.SENSOR_NAME_voltage",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "switch sensor 2",
|
|
"room": null,
|
|
"type": "switch",
|
|
"id": {
|
|
"entity_id": "switch.SENSOR_NAME_1",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
}
|
|
] |