mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-18 23:06:58 +00:00
Bunch of YAML styling improvements (#16372)
This commit is contained in:
parent
bf2909228f
commit
7910d17c08
@ -24,7 +24,7 @@ automation:
|
||||
- alias: Enable First Morning Trigger
|
||||
trigger:
|
||||
- platform: time
|
||||
at: '05:00:00'
|
||||
at: "05:00:00"
|
||||
action:
|
||||
service: homeassistant.turn_on
|
||||
entity_id: input_boolean.trigger_first_morning
|
||||
@ -47,12 +47,12 @@ automation:
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: binary_sensor.livingroom_motion
|
||||
to: 'on'
|
||||
to: "on"
|
||||
# only complete the automation if we're still waiting for the first motion
|
||||
condition:
|
||||
condition: state
|
||||
entity_id: input_boolean.trigger_first_morning
|
||||
state: 'on'
|
||||
state: "on"
|
||||
|
||||
action:
|
||||
# turn off the "waiting" boolean regardless of whether lights will turn on
|
||||
|
@ -13,42 +13,42 @@ For flashing regular lights in case an alarm is triggered.
|
||||
# AlmSnd1 - switch for a buzzer
|
||||
|
||||
automation:
|
||||
- alias: 'Alarm_PIR_Room1'
|
||||
- alias: "Alarm_PIR_Room1"
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: binary_sensor.PIR1
|
||||
to: 'on'
|
||||
to: "on"
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: switch.AlmAct1
|
||||
state: 'on'
|
||||
state: "on"
|
||||
- condition: state
|
||||
entity_id: script.alarm_room1
|
||||
state: 'off'
|
||||
state: "off"
|
||||
action:
|
||||
# start alarm on movement if alarm activated
|
||||
# and the alarm is not triggered
|
||||
service: script.turn_on
|
||||
entity_id: script.alarm_room1
|
||||
|
||||
- alias: 'flash_room1_start'
|
||||
- alias: "flash_room1_start"
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: switch.AlmSnd1
|
||||
to: 'on'
|
||||
to: "on"
|
||||
action:
|
||||
service: script.turn_on
|
||||
entity_id: script.flash_room1
|
||||
|
||||
- alias: 'flash_room1_stop'
|
||||
- alias: "flash_room1_stop"
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: switch.REL1
|
||||
to: 'off'
|
||||
to: "off"
|
||||
condition:
|
||||
condition: state
|
||||
entity_id: switch.AlmSnd1
|
||||
state: 'off'
|
||||
state: "off"
|
||||
action:
|
||||
service: script.turn_off
|
||||
entity_id: script.flash_room1
|
||||
@ -68,7 +68,7 @@ script:
|
||||
- alias: email_Room1
|
||||
service: notify.email
|
||||
data:
|
||||
message: 'Movement alarm in Room1'
|
||||
message: "Movement alarm in Room1"
|
||||
- delay:
|
||||
# time interval for alarm sound and light flashing
|
||||
seconds: 60
|
||||
|
@ -10,18 +10,18 @@ Turn on a light in the living room when it starts raining, someone is home, and
|
||||
|
||||
```yaml
|
||||
automation:
|
||||
- alias: 'Rainy Day'
|
||||
- alias: "Rainy Day"
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: sensor.precip_intensity
|
||||
to: 'rain'
|
||||
to: "rain"
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: all
|
||||
state: 'home'
|
||||
state: "home"
|
||||
- condition: time
|
||||
after: '14:00'
|
||||
before: '23:00'
|
||||
after: "14:00"
|
||||
before: "23:00"
|
||||
action:
|
||||
service: light.turn_on
|
||||
entity_id: light.couch_lamp
|
||||
@ -30,15 +30,15 @@ automation:
|
||||
And then of course turn off the lamp when it stops raining but only if it's within an hour before sunset.
|
||||
|
||||
```yaml
|
||||
- alias: 'Rain is over'
|
||||
- alias: "Rain is over"
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: sensor.precip_intensity
|
||||
to: 'None'
|
||||
to: "None"
|
||||
condition:
|
||||
- condition: sun
|
||||
after: 'sunset'
|
||||
after_offset: '-01:00:00'
|
||||
after: "sunset"
|
||||
after_offset: "-01:00:00"
|
||||
action:
|
||||
service: light.turn_off
|
||||
entity_id: light.couch_lamp
|
||||
|
@ -44,24 +44,24 @@ Send notifications through [PushBullet](/integrations/pushbullet) when the sun s
|
||||
|
||||
```yaml
|
||||
automation:
|
||||
- alias: 'Send notification when sun rises'
|
||||
- alias: "Send notification when sun rises"
|
||||
trigger:
|
||||
platform: sun
|
||||
event: sunrise
|
||||
offset: '+00:00:00'
|
||||
offset: "+00:00:00"
|
||||
action:
|
||||
service: notify.pushbullet
|
||||
data:
|
||||
message: 'The sun is up.'
|
||||
- alias: 'Send notification when sun sets'
|
||||
message: "The sun is up."
|
||||
- alias: "Send notification when sun sets"
|
||||
trigger:
|
||||
platform: sun
|
||||
event: sunset
|
||||
offset: '+00:00:00'
|
||||
offset: "+00:00:00"
|
||||
action:
|
||||
service: notify.pushbullet
|
||||
data:
|
||||
message: 'The sun is down.'
|
||||
message: "The sun is down."
|
||||
```
|
||||
|
||||
#### Automations for lights and blinds based on solar elevation
|
||||
@ -69,7 +69,7 @@ automation:
|
||||
Solar elevation automations can cope with offsets from sunset / sunrise as the seasons change better than using a time based offsets.
|
||||
|
||||
```yaml
|
||||
- alias: 'Turn a few lights on when the sun gets dim'
|
||||
- alias: "Turn a few lights on when the sun gets dim"
|
||||
trigger:
|
||||
platform: numeric_state
|
||||
entity_id: sun.sun
|
||||
@ -79,7 +79,7 @@ Solar elevation automations can cope with offsets from sunset / sunrise as the s
|
||||
service: scene.turn_on
|
||||
entity_id: scene.background_lights
|
||||
|
||||
- alias: 'Turn more lights on as the sun gets dimmer'
|
||||
- alias: "Turn more lights on as the sun gets dimmer"
|
||||
trigger:
|
||||
platform: numeric_state
|
||||
entity_id: sun.sun
|
||||
@ -89,7 +89,7 @@ Solar elevation automations can cope with offsets from sunset / sunrise as the s
|
||||
service: scene.turn_on
|
||||
entity_id: scene.more_lights
|
||||
|
||||
- alias: 'Close blind at dusk'
|
||||
- alias: "Close blind at dusk"
|
||||
trigger:
|
||||
platform: numeric_state
|
||||
entity_id: sun.sun
|
||||
|
@ -23,10 +23,10 @@ automation:
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: device_tracker.device_name_here
|
||||
from: 'not_home'
|
||||
to: 'home'
|
||||
from: "not_home"
|
||||
to: "home"
|
||||
action:
|
||||
service: notify.Telegram
|
||||
data:
|
||||
message: 'Person is now home'
|
||||
message: "Person is now home"
|
||||
```
|
||||
|
@ -17,14 +17,14 @@ input_boolean:
|
||||
|
||||
automation:
|
||||
# Changes Hue light every two minutes to random color if input boolean is set to on
|
||||
- alias: 'Set LivingColors to random color'
|
||||
- alias: "Set LivingColors to random color"
|
||||
trigger:
|
||||
platform: time_pattern
|
||||
minutes: '/2'
|
||||
minutes: "/2"
|
||||
condition:
|
||||
condition: state
|
||||
entity_id: input_boolean.loop_livingcolors
|
||||
state: 'on'
|
||||
state: "on"
|
||||
action:
|
||||
service: light.turn_on
|
||||
entity_id: light.woonkamer_livingcolors
|
||||
|
@ -13,8 +13,8 @@ For the controller this was written for scene ID 13 was sent when the up button
|
||||
```yaml
|
||||
automation:
|
||||
|
||||
- alias: 'Make the lights go bright'
|
||||
initial_state: 'on'
|
||||
- alias: "Make the lights go bright"
|
||||
initial_state: "on"
|
||||
trigger:
|
||||
- platform: event
|
||||
event_type: zwave.scene_activated
|
||||
@ -29,8 +29,8 @@ automation:
|
||||
direction: up
|
||||
light: light.YOUR_LIGHT
|
||||
|
||||
- alias: 'Make the lights go dim'
|
||||
initial_state: 'on'
|
||||
- alias: "Make the lights go dim"
|
||||
initial_state: "on"
|
||||
trigger:
|
||||
- platform: event
|
||||
event_type: zwave.scene_activated
|
||||
@ -45,8 +45,8 @@ automation:
|
||||
direction: down
|
||||
light: light.YOUR_LIGHT
|
||||
|
||||
- alias: 'Stop the light just there'
|
||||
initial_state: 'on'
|
||||
- alias: "Stop the light just there"
|
||||
initial_state: "on"
|
||||
trigger:
|
||||
- platform: event
|
||||
event_type: zwave.scene_activated
|
||||
@ -73,28 +73,28 @@ To allow flexibility all four variables are controlled by [Input Number](/integr
|
||||
```yaml
|
||||
input_number:
|
||||
light_step:
|
||||
name: 'Step the lights this much'
|
||||
name: "Step the lights this much"
|
||||
initial: 20
|
||||
min: 1
|
||||
max: 64
|
||||
step: 1
|
||||
|
||||
light_minimum:
|
||||
name: 'No dimmer than this'
|
||||
name: "No dimmer than this"
|
||||
initial: 5
|
||||
min: 1
|
||||
max: 255
|
||||
step: 1
|
||||
|
||||
light_maximum:
|
||||
name: 'No brighter than this'
|
||||
name: "No brighter than this"
|
||||
initial: 255
|
||||
min: 50
|
||||
max: 255
|
||||
step: 1
|
||||
|
||||
light_delay_ms:
|
||||
name: 'Step the lights this often (ms)'
|
||||
name: "Step the lights this often (ms)"
|
||||
initial: 500
|
||||
min: 100
|
||||
max: 5000
|
||||
|
@ -45,12 +45,12 @@ automation:
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: media_player.htpc
|
||||
from: 'playing'
|
||||
to: 'idle'
|
||||
from: "playing"
|
||||
to: "idle"
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: sun.sun
|
||||
state: 'below_horizon'
|
||||
state: "below_horizon"
|
||||
action:
|
||||
service: scene.turn_on
|
||||
entity_id: scene.livingroom_normal
|
||||
@ -59,12 +59,12 @@ automation:
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: media_player.htpc
|
||||
to: 'playing'
|
||||
from: 'idle'
|
||||
to: "playing"
|
||||
from: "idle"
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: sun.sun
|
||||
state: 'below_horizon'
|
||||
state: "below_horizon"
|
||||
action:
|
||||
service: scene.turn_on
|
||||
entity_id: scene.livingroom_dim
|
||||
|
@ -19,7 +19,7 @@ switch:
|
||||
switches:
|
||||
#Switch for Foscam Motion Detection
|
||||
foscam_motion:
|
||||
command_on: 'curl -k --tls-max 1.2 "https://ipaddress:443/cgi-bin/CGIProxy.fcgi?cmd=setMotionDetectConfig&isEnable=1&usr=admin&pwd=password"'
|
||||
command_on: "curl -k --tls-max 1.2 "https://ipaddress:443/cgi-bin/CGIProxy.fcgi?cmd=setMotionDetectConfig&isEnable=1&usr=admin&pwd=password""
|
||||
command_off: 'curl -k --tls-max 1.2 "https://ipaddress:443/cgi-bin/CGIProxy.fcgi?cmd=setMotionDetectConfig&isEnable=0&usr=admin&pwd=password"'
|
||||
command_state: 'curl -k --silent --tls-max 1.2 "https://ipaddress:443/cgi-bin/CGIProxy.fcgi?cmd=getMotionDetectConfig&usr=admin&pwd=password" | grep "isEnable" | cut -b 15'
|
||||
value_template: '{% raw %}{{ value == "1" }}{% endraw %}'
|
||||
@ -64,14 +64,14 @@ automation:
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: group.family
|
||||
from: 'home'
|
||||
from: "home"
|
||||
action:
|
||||
service: script.foscam_on
|
||||
- alias: Set Foscam to Home Mode when I arrive Home
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: group.family
|
||||
to: 'home'
|
||||
to: "home"
|
||||
action:
|
||||
service: script.foscam_off
|
||||
```
|
||||
|
@ -50,7 +50,7 @@ automation:
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: device_tracker.me
|
||||
to: 'home'
|
||||
to: "home"
|
||||
action:
|
||||
service: script.notify_mqtt
|
||||
data:
|
||||
|
@ -19,12 +19,12 @@ automation:
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: binary_sensor.updater
|
||||
from: 'off'
|
||||
to: 'on'
|
||||
from: "off"
|
||||
to: "on"
|
||||
action:
|
||||
- service: notify.jabber
|
||||
data:
|
||||
message: 'There is a new Home Assistant release available.'
|
||||
message: "There is a new Home Assistant release available."
|
||||
```
|
||||
|
||||
You can use [templates](/topics/templating/) to include the release number of Home Assistant if you prefer. The following example sends a notification via [Pushbullet](/integrations/pushbullet) with the Home Assistant version in the message.
|
||||
@ -32,7 +32,7 @@ You can use [templates](/topics/templating/) to include the release number of Ho
|
||||
```yaml
|
||||
notify:
|
||||
- platform: pushbullet
|
||||
api_key: 'YOUR_KEY_HERE'
|
||||
api_key: "YOUR_KEY_HERE"
|
||||
name: pushbullet
|
||||
|
||||
automation:
|
||||
@ -40,13 +40,13 @@ automation:
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: binary_sensor.updater
|
||||
from: 'off'
|
||||
to: 'on'
|
||||
from: "off"
|
||||
to: "on"
|
||||
action:
|
||||
- service: notify.pushbullet
|
||||
data:
|
||||
title: 'New Home Assistant Release'
|
||||
target: 'YOUR_TARGET_HERE' #See Pushbullet integration for usage
|
||||
title: "New Home Assistant Release"
|
||||
target: "YOUR_TARGET_HERE" #See Pushbullet integration for usage
|
||||
message: "Home Assistant {% raw %} {{ state_attr('binary_sensor.updater', 'newest_version') }} {% endraw %} is now available."
|
||||
```
|
||||
|
||||
|
@ -160,5 +160,5 @@ automation:
|
||||
{% else %}{% endraw %}
|
||||
none{% raw %}
|
||||
{% endif %}{% endraw %}
|
||||
media_content_type: 'music'
|
||||
media_content_type: "music"
|
||||
```
|
||||
|
@ -51,7 +51,7 @@ script:
|
||||
minutes: 15
|
||||
- service: notify.pushbullet
|
||||
data:
|
||||
message: 'WeMo not found, restarting HA'
|
||||
message: "WeMo not found, restarting HA"
|
||||
- service: switch.turn_on
|
||||
data:
|
||||
entity_id: switch.killhass
|
||||
@ -61,32 +61,32 @@ automation:
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: device_tracker.wemo
|
||||
from: 'not_home'
|
||||
to: 'home'
|
||||
from: "not_home"
|
||||
to: "home"
|
||||
condition:
|
||||
- condition: template
|
||||
value_template: {% raw %}'{% if states.switch.wemo %}false{% else %}true{% endif %}'{% endraw %}
|
||||
- condition: state
|
||||
entity_id: script.restarthawemo
|
||||
state: 'off'
|
||||
state: "off"
|
||||
action:
|
||||
service: homeassistant.turn_on
|
||||
entity_id: script.restarthawemo
|
||||
- alias: 'Stop HA'
|
||||
- alias: "Stop HA"
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: switch.KillHass
|
||||
to: 'on'
|
||||
to: "on"
|
||||
action:
|
||||
service: homeassistant.stop
|
||||
- alias: 'Stop restarting HA is WeMo is found'
|
||||
- alias: "Stop restarting HA is WeMo is found"
|
||||
trigger:
|
||||
platform: template
|
||||
value_template: {% raw %}'{% if states.switch.wemo %}true{% else %}false{% endif %}'{% endraw %}
|
||||
condition:
|
||||
condition: state
|
||||
entity_id: script.restarthawemo
|
||||
state: 'on'
|
||||
state: "on"
|
||||
action:
|
||||
service: homeassistant.turn_off
|
||||
entity_id: script.restarthawemo
|
||||
|
@ -24,9 +24,9 @@ automation:
|
||||
- alias: Send message at a given time
|
||||
trigger:
|
||||
platform: time
|
||||
at: '12:15:00'
|
||||
at: "12:15:00"
|
||||
action:
|
||||
service: notify.jabber
|
||||
data:
|
||||
message: 'Time for lunch'
|
||||
message: "Time for lunch"
|
||||
```
|
||||
|
@ -36,7 +36,7 @@ script:
|
||||
We call this now with:
|
||||
```yaml
|
||||
automation:
|
||||
- alias: 'test'
|
||||
- alias: "test"
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: input_boolean.mytest
|
||||
@ -45,8 +45,8 @@ automation:
|
||||
data:
|
||||
sonos_entity: media_player.office
|
||||
volume: 0.5
|
||||
message: 'Your husband coming home!'
|
||||
delay: '00:00:05'
|
||||
message: "Your husband coming home!"
|
||||
delay: "00:00:05"
|
||||
```
|
||||
Note that this example uses the `voicerss` text-to-speech platform. There are many platforms that can be used. The one installed by default with Home Assistant is Google TTS. This appears in your `configuration.yaml` file as:
|
||||
|
||||
|
@ -20,7 +20,7 @@ sensor:
|
||||
sensors:
|
||||
battery_iphone:
|
||||
friendly_name: iPhone Battery
|
||||
unit_of_measurement: '%'
|
||||
unit_of_measurement: "%"
|
||||
value_template: >-
|
||||
{%- if state_attr('device_tracker.iphone', 'battery') %}
|
||||
{{ state_attr('device_tracker.iphone', 'battery')|round }}
|
||||
@ -44,7 +44,7 @@ sensor:
|
||||
sensors:
|
||||
battery_phone:
|
||||
friendly_name: AndroidPhone Battery
|
||||
unit_of_measurement: '%'
|
||||
unit_of_measurement: "%"
|
||||
value_template: >-
|
||||
{%- if state_attr('device_tracker.xxxxx', 'battery_level') %}
|
||||
{{ state_attr('device_tracker.xxxxx', 'battery_level')|round }}
|
||||
@ -71,7 +71,7 @@ sensor:
|
||||
state_topic: "owntracks/username/deviceid"
|
||||
name: "Battery Tablet"
|
||||
unit_of_measurement: "%"
|
||||
value_template: '{{ value_json.batt }}'
|
||||
value_template: "{{ value_json.batt }}"
|
||||
device_class: battery
|
||||
```
|
||||
|
||||
@ -90,7 +90,7 @@ sensor:
|
||||
sensors:
|
||||
your_battery_sensor_name:
|
||||
value_template: "{{ state_attr('device_tracker.deviceid', 'battery_level') }}"
|
||||
unit_of_measurement: '%'
|
||||
unit_of_measurement: "%"
|
||||
```
|
||||
|
||||
{% endraw %}
|
||||
|
@ -14,7 +14,7 @@ automation:
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: sensor.motion_sensor
|
||||
to: 'on'
|
||||
to: "on"
|
||||
action:
|
||||
service: light.turn_on
|
||||
entity_id: light.kitchen_light
|
||||
@ -23,7 +23,7 @@ automation:
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: sensor.motion_sensor
|
||||
to: 'off'
|
||||
to: "off"
|
||||
for:
|
||||
minutes: 10
|
||||
action:
|
||||
@ -39,7 +39,7 @@ automation:
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: sensor.motion_sensor, binary_sensor.front_door, binary_sensor.doorbell
|
||||
to: 'on'
|
||||
to: "on"
|
||||
action:
|
||||
- service: light.turn_on
|
||||
data:
|
||||
@ -65,7 +65,7 @@ automation:
|
||||
|
||||
timer:
|
||||
hallway:
|
||||
duration: '00:10:00'
|
||||
duration: "00:10:00"
|
||||
```
|
||||
|
||||
You can also restrict lights from turning on based on time of day and implement transitions for fading lights on and off.
|
||||
@ -75,11 +75,11 @@ You can also restrict lights from turning on based on time of day and implement
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: binary_sensor.ecolink_pir_motion_sensor_sensor
|
||||
to: 'on'
|
||||
to: "on"
|
||||
condition:
|
||||
condition: time
|
||||
after: '07:30'
|
||||
before: '23:30'
|
||||
after: "07:30"
|
||||
before: "23:30"
|
||||
action:
|
||||
service: homeassistant.turn_on
|
||||
entity_id: group.office_lights
|
||||
@ -91,7 +91,7 @@ You can also restrict lights from turning on based on time of day and implement
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: binary_sensor.ecolink_pir_motion_sensor_sensor
|
||||
to: 'off'
|
||||
to: "off"
|
||||
for:
|
||||
minutes: 15
|
||||
action:
|
||||
|
@ -34,11 +34,11 @@ automation 2:
|
||||
# Actions are scripts so can also be a list of actions
|
||||
- service: "{{ notification_service }}"
|
||||
data:
|
||||
message: Beautiful sunset!
|
||||
message: "Beautiful sunset!"
|
||||
- delay: 0:35
|
||||
- service: notify.notify
|
||||
data:
|
||||
message: Oh wow you really missed something great.
|
||||
message: "Oh wow you really missed something great."
|
||||
```
|
||||
|
||||
Conditions can also be part of an action. You can combine multiple service calls and conditions in a single action, and they will be processed in the order you put them in. If the result of a condition is false, the action will stop there so any service calls after that condition will not be executed.
|
||||
@ -49,17 +49,20 @@ automation:
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: sensor.office_occupancy
|
||||
to: 'on'
|
||||
to: "on"
|
||||
action:
|
||||
- service: notify.notify
|
||||
data:
|
||||
message: Testing conditional actions
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: template
|
||||
value_template: '{% raw %}{{ state_attr('sun.sun', 'elevation') < 4 }}{% endraw %}'
|
||||
- condition: template
|
||||
value_template: '{% raw %}{{ states('sensor.office_illuminance') < 10 }}{% endraw %}'
|
||||
- service: scene.turn_on
|
||||
- condition: numeric_state
|
||||
entity_id: sun.sun
|
||||
attribute: elevation
|
||||
below: 4
|
||||
- condition: state
|
||||
entity_id: sensor.office_illuminance
|
||||
below: 10
|
||||
- service: scene.turn_on
|
||||
entity_id: scene.office_at_evening
|
||||
```
|
||||
|
@ -46,7 +46,7 @@ automation my_lights:
|
||||
# with a '-'' to enter multiple
|
||||
- condition: state
|
||||
entity_id: all
|
||||
state: 'home'
|
||||
state: "home"
|
||||
- condition: time
|
||||
after: '16:00:00'
|
||||
before: '23:00:00'
|
||||
|
@ -108,7 +108,7 @@ homeassistant:
|
||||
light:
|
||||
icon: mdi:home
|
||||
automation:
|
||||
initial_state: 'on'
|
||||
initial_state: "on"
|
||||
# Customize entities matching a pattern
|
||||
customize_glob:
|
||||
"light.kitchen_*":
|
||||
|
@ -18,7 +18,7 @@ script:
|
||||
entity_id: light.ceiling
|
||||
- service: notify.notify
|
||||
data:
|
||||
message: 'Turned on the ceiling light!'
|
||||
message: "Turned on the ceiling light!"
|
||||
```
|
||||
|
||||
- [Call a Service](#call-a-service)
|
||||
@ -68,7 +68,9 @@ The variables command allows you to set/override variables that will be accessib
|
||||
|
||||
```yaml
|
||||
- variables:
|
||||
entities: light.kitchen, light.living_room
|
||||
entities:
|
||||
- light.kitchen
|
||||
- light.living_room
|
||||
brightness: 100
|
||||
- alias: Control lights
|
||||
service: light.turn_on
|
||||
@ -87,7 +89,7 @@ While executing a script you can add a condition to stop further execution. When
|
||||
# If paulus is home, continue to execute the script below these lines
|
||||
- condition: state
|
||||
entity_id: device_tracker.paulus
|
||||
state: 'home'
|
||||
state: "home"
|
||||
```
|
||||
|
||||
## Delay
|
||||
@ -95,6 +97,7 @@ While executing a script you can add a condition to stop further execution. When
|
||||
Delays are useful for temporarily suspending your script and start it at a later moment. We support different syntaxes for a delay as shown below.
|
||||
|
||||
{% raw %}
|
||||
|
||||
```yaml
|
||||
# Seconds
|
||||
# Waits 5 seconds
|
||||
@ -120,15 +123,18 @@ Delays are useful for temporarily suspending your script and start it at a later
|
||||
- delay:
|
||||
minutes: 1
|
||||
```
|
||||
|
||||
{% endraw %}
|
||||
|
||||
All forms accept templates.
|
||||
|
||||
{% raw %}
|
||||
|
||||
```yaml
|
||||
# Waits however many minutes input_number.minute_delay is set to
|
||||
- delay: "{{ states('input_number.minute_delay') | multiply(60) | int }}"
|
||||
```
|
||||
|
||||
{% endraw %}
|
||||
|
||||
## Wait
|
||||
@ -145,15 +151,18 @@ The template is re-evaluated whenever an entity ID that it references changes st
|
||||
|
||||
{% raw %}
|
||||
```yaml
|
||||
|
||||
# Wait until media player have stop the playing
|
||||
- wait_template: "{{ is_state('media_player.floor', 'stop') }}"
|
||||
```
|
||||
|
||||
{% endraw %}
|
||||
|
||||
### Wait for Trigger
|
||||
|
||||
This action can use the same triggers that are available in an automation's `trigger` section. See [Automation Trigger](/docs/automation/trigger). The script will continue whenever any of the triggers fires.
|
||||
{% raw %}
|
||||
|
||||
```yaml
|
||||
# Wait for a custom event or light to turn on and stay on for 10 sec
|
||||
- wait_for_trigger:
|
||||
@ -164,6 +173,7 @@ This action can use the same triggers that are available in an automation's `tri
|
||||
to: 'on'
|
||||
for: 10
|
||||
```
|
||||
|
||||
{% endraw %}
|
||||
|
||||
### Wait Timeout
|
||||
@ -171,17 +181,20 @@ This action can use the same triggers that are available in an automation's `tri
|
||||
With both types of waits it is possible to set a timeout after which the script will continue its execution if the condition/event is not satisfied. Timeout has the same syntax as `delay`, and like `delay`, also accepts templates.
|
||||
|
||||
{% raw %}
|
||||
|
||||
```yaml
|
||||
# Wait for sensor to change to 'on' up to 1 minute before continuing to execute.
|
||||
- wait_template: "{{ is_state('binary_sensor.entrance', 'on') }}"
|
||||
timeout: '00:01:00'
|
||||
```
|
||||
|
||||
{% endraw %}
|
||||
|
||||
You can also get the script to abort after the timeout by using optional `continue_on_timeout: false`.
|
||||
|
||||
{% raw %}
|
||||
```yaml
|
||||
|
||||
# Wait for IFTTT event or abort after specified timeout.
|
||||
- wait_for_trigger:
|
||||
- platform: event
|
||||
@ -192,6 +205,7 @@ You can also get the script to abort after the timeout by using optional `contin
|
||||
minutes: "{{ timeout_minutes }}"
|
||||
continue_on_timeout: false
|
||||
```
|
||||
|
||||
{% endraw %}
|
||||
|
||||
Without `continue_on_timeout: false` the script will always continue since the default for `continue_on_timeout` is `true`.
|
||||
@ -209,14 +223,13 @@ Variable | Description
|
||||
This can be used to take different actions based on whether or not the condition was met, or to use more than one wait sequentially while implementing a single timeout overall.
|
||||
|
||||
{% raw %}
|
||||
|
||||
```yaml
|
||||
# Take different actions depending on if condition was met.
|
||||
- wait_template: "{{ is_state('binary_sensor.door', 'on') }}"
|
||||
timeout: 10
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: template
|
||||
value_template: "{{ not wait.completed }}"
|
||||
- conditions: "{{ not wait.completed }}"
|
||||
sequence:
|
||||
- service: script.door_did_not_open
|
||||
default:
|
||||
@ -234,7 +247,7 @@ This can be used to take different actions based on whether or not the condition
|
||||
- wait_for_trigger:
|
||||
- platform: state
|
||||
entity_id: binary_sensor.door_2
|
||||
to: 'on'
|
||||
to: "on"
|
||||
for: 2
|
||||
timeout: "{{ wait.remaining }}"
|
||||
continue_on_timeout: false
|
||||
@ -260,35 +273,36 @@ You can also use event_data to fire an event with custom data. This could be use
|
||||
an event trigger.
|
||||
|
||||
{% raw %}
|
||||
|
||||
```yaml
|
||||
- event: MY_EVENT
|
||||
event_data:
|
||||
name: myEvent
|
||||
customData: "{{ myCustomVariable }}"
|
||||
```
|
||||
|
||||
{% endraw %}
|
||||
|
||||
### Raise and Consume Custom Events
|
||||
|
||||
The following automation shows how to raise a custom event called `event_light_state_changed` with `entity_id` as the event data. The action part could be inside a script or an automation.
|
||||
|
||||
{% raw %}
|
||||
```yaml
|
||||
- alias: Fire Event
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: switch.kitchen
|
||||
to: 'on'
|
||||
to: "on"
|
||||
action:
|
||||
- event: event_light_state_changed
|
||||
event_data:
|
||||
state: 'on'
|
||||
state: "on"
|
||||
```
|
||||
{% endraw %}
|
||||
|
||||
The following automation shows how to capture the custom event `event_light_state_changed`, and retrieve corresponding `entity_id` that was passed as the event data.
|
||||
|
||||
{% raw %}
|
||||
|
||||
```yaml
|
||||
- alias: Capture Event
|
||||
trigger:
|
||||
@ -299,6 +313,7 @@ The following automation shows how to capture the custom event `event_light_stat
|
||||
data:
|
||||
message: "kitchen light is turned {{ trigger.event.data.state }}"
|
||||
```
|
||||
|
||||
{% endraw %}
|
||||
|
||||
## Repeat a Group of Actions
|
||||
@ -312,6 +327,7 @@ This form accepts a count value. The value may be specified by a template, in wh
|
||||
the template is rendered when the repeat step is reached.
|
||||
|
||||
{% raw %}
|
||||
|
||||
```yaml
|
||||
script:
|
||||
flash_light:
|
||||
@ -334,6 +350,7 @@ script:
|
||||
light: hallway
|
||||
count: 3
|
||||
```
|
||||
|
||||
{% endraw %}
|
||||
|
||||
### While Loop
|
||||
@ -353,7 +370,7 @@ script:
|
||||
while:
|
||||
- condition: state
|
||||
entity_id: input_boolean.do_something
|
||||
state: 'on'
|
||||
state: "on"
|
||||
# Don't do it too many times
|
||||
- condition: template
|
||||
value_template: "{{ repeat.index <= 20 }}"
|
||||
@ -393,7 +410,7 @@ automation:
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.something
|
||||
state: 'off'
|
||||
state: "off"
|
||||
mode: single
|
||||
action:
|
||||
- alias: Repeat the sequence UNTIL the conditions are true
|
||||
@ -408,7 +425,7 @@ automation:
|
||||
# Did it work?
|
||||
- condition: state
|
||||
entity_id: binary_sensor.something
|
||||
state: 'on'
|
||||
state: "on"
|
||||
```
|
||||
|
||||
{% endraw %}
|
||||
|
@ -17,7 +17,7 @@ condition:
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: 'device_tracker.paulus'
|
||||
state: 'home'
|
||||
state: "home"
|
||||
- condition: numeric_state
|
||||
entity_id: 'sensor.temperature'
|
||||
below: 20
|
||||
@ -31,7 +31,7 @@ The following configuration works the same as the one listed above:
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: 'device_tracker.paulus'
|
||||
state: 'home'
|
||||
state: "home"
|
||||
- condition: numeric_state
|
||||
entity_id: 'sensor.temperature'
|
||||
below: 20
|
||||
@ -49,7 +49,7 @@ condition:
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: 'device_tracker.paulus'
|
||||
state: 'home'
|
||||
state: "home"
|
||||
- condition: numeric_state
|
||||
entity_id: 'sensor.temperature'
|
||||
below: 20
|
||||
@ -66,12 +66,12 @@ condition:
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: 'device_tracker.paulus'
|
||||
state: 'home'
|
||||
state: "home"
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: sensor.weather_precip
|
||||
state: 'rain'
|
||||
state: "rain"
|
||||
- condition: numeric_state
|
||||
entity_id: 'sensor.temperature'
|
||||
below: 20
|
||||
@ -87,7 +87,7 @@ condition:
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: device_tracker.paulus
|
||||
state: 'home'
|
||||
state: "home"
|
||||
- condition: state
|
||||
entity_id: alarm_control_panel.home_alarm
|
||||
state: disarmed
|
||||
@ -167,7 +167,7 @@ Tests if an entity is a specified state.
|
||||
condition:
|
||||
condition: state
|
||||
entity_id: device_tracker.paulus
|
||||
state: 'not_home'
|
||||
state: "not_home"
|
||||
# optional: trigger only if state was this for last X time.
|
||||
for:
|
||||
hours: 1
|
||||
@ -184,7 +184,7 @@ condition:
|
||||
entity_id:
|
||||
- light.kitchen
|
||||
- light.living_room
|
||||
state: 'on'
|
||||
state: "on"
|
||||
```
|
||||
|
||||
Testing if an entity is matching a set of possible conditions;
|
||||
@ -245,14 +245,14 @@ The sun state can be used to test if the sun has set or risen.
|
||||
condition:
|
||||
condition: state # 'day' condition: from sunrise until sunset
|
||||
entity_id: sun.sun
|
||||
state: 'above_horizon'
|
||||
state: "above_horizon"
|
||||
```
|
||||
|
||||
```yaml
|
||||
condition:
|
||||
condition: state # from sunset until sunrise
|
||||
entity_id: sun.sun
|
||||
state: 'below_horizon'
|
||||
state: "below_horizon"
|
||||
```
|
||||
|
||||
### Sun elevation condition
|
||||
@ -532,13 +532,13 @@ condition:
|
||||
below: 1
|
||||
- condition: state
|
||||
entity_id: light.living_room
|
||||
state: 'off'
|
||||
state: "off"
|
||||
- condition: time
|
||||
before: '23:00:00'
|
||||
after: '14:00:00'
|
||||
- condition: state
|
||||
entity_id: script.light_turned_off_5min
|
||||
state: 'off'
|
||||
state: "off"
|
||||
```
|
||||
|
||||
{% endraw %}
|
||||
|
@ -47,7 +47,7 @@ alarm_control_panel:
|
||||
disarm:
|
||||
- condition: state
|
||||
entity_id: device_tracker.paulus
|
||||
state: 'home'
|
||||
state: "home"
|
||||
- service: alarm_control_panel.alarm_arm_home
|
||||
data:
|
||||
entity_id: alarm_control_panel.real_alarm
|
||||
|
@ -38,7 +38,7 @@ alert:
|
||||
name: Garage is open
|
||||
done_message: Garage is closed
|
||||
entity_id: input_boolean.garage_door
|
||||
state: 'on'
|
||||
state: "on"
|
||||
repeat: 30
|
||||
can_acknowledge: true
|
||||
skip_first: true
|
||||
@ -137,7 +137,7 @@ alert:
|
||||
freshwater_temp_alert:
|
||||
name: "Warning: I have detected a problem with the freshwater tank temperature"
|
||||
entity_id: binary_sensor.freshwater_temperature_status
|
||||
state: 'on'
|
||||
state: "on"
|
||||
repeat: 5
|
||||
can_acknowledge: true
|
||||
skip_first: false
|
||||
@ -194,7 +194,7 @@ alert:
|
||||
garage_door:
|
||||
name: Garage is open
|
||||
entity_id: input_boolean.garage_door
|
||||
state: 'on' # Optional, 'on' is the default value
|
||||
state: "on" # Optional, 'on' is the default value
|
||||
repeat:
|
||||
- 15
|
||||
- 30
|
||||
@ -228,7 +228,7 @@ alert:
|
||||
office_plant:
|
||||
name: Plant in office needs help
|
||||
entity_id: plant.plant_office
|
||||
state: 'problem'
|
||||
state: "problem"
|
||||
repeat: 30
|
||||
can_acknowledge: true
|
||||
skip_first: true
|
||||
@ -254,7 +254,7 @@ alert:
|
||||
garage_door:
|
||||
name: Garage is open
|
||||
entity_id: input_boolean.garage_door
|
||||
state: 'on' # Optional, 'on' is the default value
|
||||
state: "on" # Optional, 'on' is the default value
|
||||
repeat:
|
||||
- 15
|
||||
- 30
|
||||
|
@ -54,7 +54,7 @@ The Arlo integration also provides a camera service to enable/disable the motion
|
||||
```yaml
|
||||
#automation.yaml
|
||||
- alias: Enable Arlo upon HA start'
|
||||
initial_state: 'on'
|
||||
initial_state: "on"
|
||||
trigger:
|
||||
platform: homeassistant
|
||||
event: start
|
||||
|
@ -28,7 +28,7 @@ binary_sensor:
|
||||
prob_given_true: 0.6
|
||||
prob_given_false: 0.2
|
||||
platform: 'state'
|
||||
to_state: 'on'
|
||||
to_state: "on"
|
||||
```
|
||||
|
||||
{% configuration %}
|
||||
@ -99,20 +99,20 @@ binary_sensor:
|
||||
entity_id: 'sensor.living_room_motion'
|
||||
prob_given_true: 0.4
|
||||
prob_given_false: 0.2
|
||||
to_state: 'off'
|
||||
to_state: "off"
|
||||
- platform: 'state'
|
||||
entity_id: 'sensor.basement_motion'
|
||||
prob_given_true: 0.5
|
||||
prob_given_false: 0.4
|
||||
to_state: 'off'
|
||||
to_state: "off"
|
||||
- platform: 'state'
|
||||
entity_id: 'sensor.bedroom_motion'
|
||||
prob_given_true: 0.5
|
||||
to_state: 'on'
|
||||
to_state: "on"
|
||||
- platform: 'state'
|
||||
entity_id: 'sun.sun'
|
||||
prob_given_true: 0.7
|
||||
to_state: 'below_horizon'
|
||||
to_state: "below_horizon"
|
||||
```
|
||||
|
||||
Next up an example which targets the `numeric_state` observation platform,
|
||||
|
@ -108,7 +108,7 @@ The requirement is that you have setup the [`xiaomi aqara` integration](/integra
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: group.family
|
||||
state: 'not_home'
|
||||
state: "not_home"
|
||||
action:
|
||||
- service: notify.notify_person
|
||||
data:
|
||||
|
@ -171,5 +171,5 @@ calendar:
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: calendar.work_holiday
|
||||
state: 'off'
|
||||
state: "off"
|
||||
```
|
||||
|
@ -186,7 +186,7 @@ Requesting support for additional devices requires the device model (can be acqu
|
||||
```yaml
|
||||
automation:
|
||||
- alias: 'Toggle lamp from dimmer'
|
||||
initial_state: 'on'
|
||||
initial_state: "on"
|
||||
trigger:
|
||||
platform: event
|
||||
event_type: deconz_event
|
||||
@ -198,7 +198,7 @@ automation:
|
||||
entity_id: light.lamp
|
||||
|
||||
- alias: 'Increase brightness of lamp from dimmer'
|
||||
initial_state: 'on'
|
||||
initial_state: "on"
|
||||
trigger:
|
||||
platform: event
|
||||
event_type: deconz_event
|
||||
@ -214,7 +214,7 @@ automation:
|
||||
{{ [bri+30, 249] | min }}
|
||||
|
||||
- alias: 'Decrease brightness of lamp from dimmer'
|
||||
initial_state: 'on'
|
||||
initial_state: "on"
|
||||
trigger:
|
||||
platform: event
|
||||
event_type: deconz_event
|
||||
@ -230,7 +230,7 @@ automation:
|
||||
{{ [bri-30, 0] | max }}
|
||||
|
||||
- alias: 'Turn lamp on when turning cube clockwise'
|
||||
initial_state: 'on'
|
||||
initial_state: "on"
|
||||
trigger:
|
||||
platform: event
|
||||
event_type: deconz_event
|
||||
|
@ -139,7 +139,7 @@ You can also use the `homeassistant.update_entity` service to update the sensor
|
||||
```yaml
|
||||
- id: update_morning_commute_sensor
|
||||
alias: "Commute - Update morning commute sensor"
|
||||
initial_state: 'on'
|
||||
initial_state: "on"
|
||||
trigger:
|
||||
- platform: time_pattern
|
||||
minutes: '/2'
|
||||
|
@ -157,7 +157,7 @@ You can also use the `homeassistant.update_entity` service to update the sensor
|
||||
automation:
|
||||
- id: update_morning_commute_sensor
|
||||
alias: "Commute - Update morning commute sensor"
|
||||
initial_state: 'on'
|
||||
initial_state: "on"
|
||||
trigger:
|
||||
- platform: time_pattern
|
||||
minutes: '/2'
|
||||
|
@ -32,7 +32,7 @@ sensor:
|
||||
- platform: history_stats
|
||||
name: Lamp ON today
|
||||
entity_id: light.my_lamp
|
||||
state: 'on'
|
||||
state: "on"
|
||||
type: time
|
||||
start: '{{ now().replace(hour=0, minute=0, second=0) }}'
|
||||
end: '{{ now() }}'
|
||||
|
@ -79,7 +79,7 @@ automation:
|
||||
condition:
|
||||
condition: state
|
||||
entity_id: input_boolean.notify_home
|
||||
state: 'on'
|
||||
state: "on"
|
||||
action:
|
||||
service: notify.pushbullet
|
||||
data:
|
||||
|
@ -129,7 +129,7 @@ automation:
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: light.some_light
|
||||
state: 'off'
|
||||
state: "off"
|
||||
action:
|
||||
- service: light.turn_on
|
||||
entity_id: light.some_light
|
||||
@ -145,7 +145,7 @@ automation:
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: light.some_light
|
||||
state: 'off'
|
||||
state: "off"
|
||||
action:
|
||||
- service: light.turn_on
|
||||
entity_id: light.some_light
|
||||
@ -390,7 +390,7 @@ automation:
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: light.some_light
|
||||
state: 'off'
|
||||
state: "off"
|
||||
action:
|
||||
- service: light.turn_on
|
||||
entity_id: light.some_light
|
||||
@ -406,7 +406,7 @@ automation:
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: light.some_light
|
||||
state: 'off'
|
||||
state: "off"
|
||||
action:
|
||||
- service: light.turn_on
|
||||
entity_id: light.some_light
|
||||
|
@ -204,7 +204,7 @@ Example automation using these IR codes to toggle a Sonoff plug.
|
||||
|
||||
```yaml
|
||||
# Example kira_sensor
|
||||
- id: '1583339338363'
|
||||
- id: "1583339338363"
|
||||
alias: Panasonic On
|
||||
description: Turn on sonoff s20 relay
|
||||
trigger:
|
||||
@ -217,8 +217,8 @@ Example automation using these IR codes to toggle a Sonoff plug.
|
||||
domain: switch
|
||||
entity_id: switch.plug2_relay
|
||||
type: turn_on
|
||||
- id: '1584035716024'
|
||||
alias: 'Panaxonic Off '
|
||||
- id: "1584035716024"
|
||||
alias: "Panaxonic Off "
|
||||
description: Turn off sonoff s20 relay
|
||||
trigger:
|
||||
- entity_id: sensor.kira_wireless
|
||||
|
@ -72,7 +72,7 @@ Alternatively, if you want to use the [XKNX](https://xknx.io/) library abstracti
|
||||
|
||||
```yaml
|
||||
knx:
|
||||
config_file: '/path/to/xknx.yaml'
|
||||
config_file: "/path/to/xknx.yaml"
|
||||
```
|
||||
|
||||
{% configuration %}
|
||||
@ -107,9 +107,9 @@ If the auto detection of the KNX/IP device does not work, you can specify IP and
|
||||
```yaml
|
||||
knx:
|
||||
tunneling:
|
||||
host: '192.168.2.23'
|
||||
host: "192.168.2.23"
|
||||
port: 3671
|
||||
local_ip: '192.168.2.109'
|
||||
local_ip: "192.168.2.109"
|
||||
```
|
||||
|
||||
{% configuration %}
|
||||
@ -132,7 +132,7 @@ Explicit connection to a KNX/IP routing device:
|
||||
```yaml
|
||||
knx:
|
||||
routing:
|
||||
local_ip: '192.168.2.109'
|
||||
local_ip: "192.168.2.109"
|
||||
```
|
||||
|
||||
{% configuration %}
|
||||
@ -197,28 +197,28 @@ KNX integration is able to expose entity states or attributes to KNX bus. The in
|
||||
# Example configuration.yaml entry
|
||||
knx:
|
||||
expose:
|
||||
- type: 'temperature'
|
||||
entity_id: 'sensor.owm_temperature'
|
||||
address: '0/0/2'
|
||||
- type: 'string'
|
||||
address: '0/6/4'
|
||||
- type: "temperature"
|
||||
entity_id: "sensor.owm_temperature"
|
||||
address: "0/0/2"
|
||||
- type: "string"
|
||||
address: "0/6/4"
|
||||
entity_id: "sensor.owm_weather"
|
||||
- type: 'binary'
|
||||
entity_id: 'binary_sensor.kitchen_window'
|
||||
address: '0/6/5'
|
||||
- type: 'binary'
|
||||
entity_id: 'light.office'
|
||||
address: '0/3/0'
|
||||
- type: "binary"
|
||||
entity_id: "binary_sensor.kitchen_window"
|
||||
address: "0/6/5"
|
||||
- type: "binary"
|
||||
entity_id: "light.office"
|
||||
address: "0/3/0"
|
||||
default: false
|
||||
- type: 'percentU8'
|
||||
entity_id: 'light.office'
|
||||
attribute: 'brightness'
|
||||
- type: "percentU8"
|
||||
entity_id: "light.office"
|
||||
attribute: "brightness"
|
||||
default: 0
|
||||
address: '0/3/1'
|
||||
- type: 'time'
|
||||
address: '0/0/1'
|
||||
- type: 'datetime'
|
||||
address: '0/0/23'
|
||||
address: "0/3/1"
|
||||
- type: "time"
|
||||
address: "0/0/1"
|
||||
- type: "datetime"
|
||||
address: "0/0/23"
|
||||
```
|
||||
|
||||
{% configuration %}
|
||||
@ -261,7 +261,7 @@ To use your binary sensors please add the relevant configuration to your top lev
|
||||
knx:
|
||||
binary_sensor:
|
||||
- name: sensor1
|
||||
state_address: '6/0/2'
|
||||
state_address: "6/0/2"
|
||||
```
|
||||
|
||||
{% configuration %}
|
||||
@ -321,7 +321,7 @@ automation:
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.cover_abstell
|
||||
state: 'on'
|
||||
state: "on"
|
||||
action:
|
||||
- entity_id: light.hue_color_lamp_1
|
||||
service: light.turn_on
|
||||
@ -334,7 +334,7 @@ automation:
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.cover_abstell
|
||||
state: 'on'
|
||||
state: "on"
|
||||
action:
|
||||
- entity_id: light.hue_bloom_1
|
||||
service: homeassistant.turn_on
|
||||
@ -374,12 +374,12 @@ To use your KNX thermostats in your installation, add the following lines to you
|
||||
knx:
|
||||
climate:
|
||||
- name: HASS-Kitchen.Temperature
|
||||
temperature_address: '5/1/1'
|
||||
setpoint_shift_address: '5/1/2'
|
||||
setpoint_shift_state_address: '5/1/3'
|
||||
target_temperature_state_address: '5/1/4'
|
||||
operation_mode_address: '5/1/5'
|
||||
operation_mode_state_address: '5/1/6'
|
||||
temperature_address: "5/1/1"
|
||||
setpoint_shift_address: "5/1/2"
|
||||
setpoint_shift_state_address: "5/1/3"
|
||||
target_temperature_state_address: "5/1/4"
|
||||
operation_mode_address: "5/1/5"
|
||||
operation_mode_state_address: "5/1/6"
|
||||
```
|
||||
|
||||
Alternatively, if your device has dedicated binary group addresses for frost/night/comfort mode:
|
||||
@ -389,14 +389,14 @@ Alternatively, if your device has dedicated binary group addresses for frost/nig
|
||||
knx:
|
||||
climate:
|
||||
- name: HASS-Kitchen.Temperature
|
||||
temperature_address: '5/1/1'
|
||||
setpoint_shift_address: '5/1/2'
|
||||
setpoint_shift_state_address: '5/1/3'
|
||||
target_temperature_state_address: '5/1/4'
|
||||
operation_mode_frost_protection_address: '5/1/5'
|
||||
operation_mode_night_address: '5/1/6'
|
||||
operation_mode_comfort_address: '5/1/7'
|
||||
operation_mode_state_address: '5/1/8'
|
||||
temperature_address: "5/1/1"
|
||||
setpoint_shift_address: "5/1/2"
|
||||
setpoint_shift_state_address: "5/1/3"
|
||||
target_temperature_state_address: "5/1/4"
|
||||
operation_mode_frost_protection_address: "5/1/5"
|
||||
operation_mode_night_address: "5/1/6"
|
||||
operation_mode_comfort_address: "5/1/7"
|
||||
operation_mode_state_address: "5/1/8"
|
||||
```
|
||||
|
||||
If your device doesn't support setpoint_shift calculations (i.e., if you don't provide a `setpoint_shift_address` value) please set the `min_temp` and `max_temp`
|
||||
@ -407,14 +407,14 @@ attributes of the climate device to avoid issues with exceeding valid temperatur
|
||||
knx:
|
||||
climate:
|
||||
- name: HASS-Kitchen.Temperature
|
||||
temperature_address: '5/1/2'
|
||||
target_temperature_address: '5/1/4'
|
||||
target_temperature_state_address: '5/1/1'
|
||||
operation_mode_frost_protection_address: '5/1/5'
|
||||
operation_mode_night_address: '5/1/6'
|
||||
operation_mode_comfort_address: '5/1/7'
|
||||
operation_mode_state_address: '5/1/8'
|
||||
operation_mode_standby_address: '5/1/9'
|
||||
temperature_address: "5/1/2"
|
||||
target_temperature_address: "5/1/4"
|
||||
target_temperature_state_address: "5/1/1"
|
||||
operation_mode_frost_protection_address: "5/1/5"
|
||||
operation_mode_night_address: "5/1/6"
|
||||
operation_mode_comfort_address: "5/1/7"
|
||||
operation_mode_state_address: "5/1/8"
|
||||
operation_mode_standby_address: "5/1/9"
|
||||
min_temp: 7.0
|
||||
max_temp: 32.0
|
||||
```
|
||||
@ -431,13 +431,13 @@ Example:
|
||||
knx:
|
||||
climate:
|
||||
- name: HASS-Kitchen.Temperature
|
||||
temperature_address: '5/1/1'
|
||||
setpoint_shift_address: '5/1/2'
|
||||
setpoint_shift_state_address: '5/1/3'
|
||||
setpoint_shift_mode: 'DPT9002'
|
||||
target_temperature_state_address: '5/1/4'
|
||||
operation_mode_address: '5/1/5'
|
||||
operation_mode_state_address: '5/1/6'
|
||||
temperature_address: "5/1/1"
|
||||
setpoint_shift_address: "5/1/2"
|
||||
setpoint_shift_state_address: "5/1/3"
|
||||
setpoint_shift_mode: "DPT9002"
|
||||
target_temperature_state_address: "5/1/4"
|
||||
operation_mode_address: "5/1/5"
|
||||
operation_mode_state_address: "5/1/6"
|
||||
```
|
||||
|
||||
`operation_mode_frost_protection_address` / `operation_mode_night_address` / `operation_mode_comfort_address` / `operation_mode_standby_address` are not necessary if `operation_mode_address` is specified.
|
||||
@ -601,11 +601,11 @@ To use your KNX covers in your installation, add the following lines to your top
|
||||
knx:
|
||||
cover:
|
||||
- name: "Kitchen.Shutter"
|
||||
move_long_address: '3/0/0'
|
||||
move_short_address: '3/0/1'
|
||||
stop_address: '3/0/4'
|
||||
position_address: '3/0/3'
|
||||
position_state_address: '3/0/2'
|
||||
move_long_address: "3/0/0"
|
||||
move_short_address: "3/0/1"
|
||||
stop_address: "3/0/4"
|
||||
position_address: "3/0/3"
|
||||
position_state_address: "3/0/2"
|
||||
travelling_time_down: 51
|
||||
travelling_time_up: 61
|
||||
```
|
||||
@ -687,8 +687,8 @@ To use your KNX light in your installation, add the following lines to your top
|
||||
# Example configuration.yaml entry
|
||||
knx:
|
||||
light:
|
||||
- name: 'kitchen'
|
||||
address: '1/0/9'
|
||||
- name: "kitchen"
|
||||
address: "1/0/9"
|
||||
```
|
||||
|
||||
{% configuration %}
|
||||
@ -766,36 +766,36 @@ knx:
|
||||
light:
|
||||
# dimmable light
|
||||
- name: Bedroom-Light-1
|
||||
address: '1/0/9'
|
||||
state_address: '1/1/9'
|
||||
brightness_address: '1/2/9'
|
||||
brightness_state_address: '1/3/9'
|
||||
address: "1/0/9"
|
||||
state_address: "1/1/9"
|
||||
brightness_address: "1/2/9"
|
||||
brightness_state_address: "1/3/9"
|
||||
#
|
||||
# RGB light
|
||||
- name: Bathroom-Light-1
|
||||
address: '1/0/9'
|
||||
state_address: '1/1/9'
|
||||
brightness_address: '1/2/9'
|
||||
brightness_state_address: '1/3/9'
|
||||
color_address: '1/4/9'
|
||||
color_state_address: '1/5/9'
|
||||
address: "1/0/9"
|
||||
state_address: "1/1/9"
|
||||
brightness_address: "1/2/9"
|
||||
brightness_state_address: "1/3/9"
|
||||
color_address: "1/4/9"
|
||||
color_state_address: "1/5/9"
|
||||
#
|
||||
# tunable white light
|
||||
- name: Office-Light-1
|
||||
address: '1/0/21'
|
||||
state_address: '1/1/21'
|
||||
brightness_address: '1/2/21'
|
||||
brightness_state_address: '1/3/21'
|
||||
color_temperature_address: '1/4/21'
|
||||
color_temperature_state_address: '1/5/21'
|
||||
address: "1/0/21"
|
||||
state_address: "1/1/21"
|
||||
brightness_address: "1/2/21"
|
||||
brightness_state_address: "1/3/21"
|
||||
color_temperature_address: "1/4/21"
|
||||
color_temperature_state_address: "1/5/21"
|
||||
color_temperature_mode: absolute
|
||||
min_kelvin: 2550
|
||||
max_kelvin: 6200
|
||||
#
|
||||
# actuator without dedicated state communication object
|
||||
- name: Cellar-Light-1
|
||||
address: '1/0/5'
|
||||
state_address: '1/0/5'
|
||||
address: "1/0/5"
|
||||
state_address: "1/0/5"
|
||||
```
|
||||
|
||||
## Notify
|
||||
@ -810,7 +810,7 @@ To use your KNX switch in your installation, add the following lines to your top
|
||||
knx:
|
||||
notify:
|
||||
- name: Alarm
|
||||
address: '5/1/10'
|
||||
address: "5/1/10"
|
||||
```
|
||||
|
||||
{% configuration %}
|
||||
@ -872,7 +872,7 @@ To use your KNX sensor in your installation, add the following lines to your top
|
||||
knx:
|
||||
sensor:
|
||||
- name: Heating.Valve1
|
||||
state_address: '2/0/0'
|
||||
state_address: "2/0/0"
|
||||
```
|
||||
|
||||
In order to actively read the sensor data from the bus all 30 minutes you can add the following lines to your `configuration.yaml`:
|
||||
@ -882,7 +882,7 @@ In order to actively read the sensor data from the bus all 30 minutes you can ad
|
||||
knx:
|
||||
sensor:
|
||||
- name: Heating.Valve1
|
||||
state_address: '2/0/0'
|
||||
state_address: "2/0/0"
|
||||
sync_state: every 30
|
||||
```
|
||||
|
||||
@ -1058,13 +1058,13 @@ always_callback:
|
||||
knx:
|
||||
sensor:
|
||||
- name: Heating.Valve1
|
||||
state_address: '2/0/0'
|
||||
state_address: "2/0/0"
|
||||
sync_state: init
|
||||
type: 'percent'
|
||||
type: "percent"
|
||||
- name: Kitchen.Temperature
|
||||
state_address: '6/2/1'
|
||||
state_address: "6/2/1"
|
||||
sync_state: every 60
|
||||
type: 'temperature'
|
||||
type: "temperature"
|
||||
```
|
||||
|
||||
## Switch
|
||||
@ -1079,7 +1079,7 @@ To use your KNX switch in your installation, add the following lines to your top
|
||||
knx:
|
||||
switch:
|
||||
- name: Kitchen.Coffee
|
||||
address: '1/1/6'
|
||||
address: "1/1/6"
|
||||
```
|
||||
|
||||
{% configuration %}
|
||||
|
@ -261,19 +261,19 @@ konnected:
|
||||
binary_sensors:
|
||||
- zone: 1
|
||||
type: door
|
||||
name: 'Front Door'
|
||||
name: "Front Door"
|
||||
- zone: 2
|
||||
type: smoke
|
||||
name: 'Bedroom Smoke Detector'
|
||||
name: "Bedroom Smoke Detector"
|
||||
inverse: true
|
||||
- zone: 3
|
||||
type: motion
|
||||
name: 'Test Motion'
|
||||
name: "Test Motion"
|
||||
switches:
|
||||
- zone: out
|
||||
name: siren
|
||||
- zone: 5
|
||||
name: 'Beep Beep'
|
||||
name: "Beep Beep"
|
||||
momentary: 65
|
||||
pause: 55
|
||||
repeat: 4
|
||||
|
@ -115,18 +115,18 @@ To add a notification sound, icon, cycles, or priority override, it has to be do
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: device_tracker.son_mobile
|
||||
from: 'not_home'
|
||||
to: 'school'
|
||||
from: "not_home"
|
||||
to: "school"
|
||||
action:
|
||||
service: notify.lametric
|
||||
data:
|
||||
message: "Son has arrived at school!"
|
||||
data:
|
||||
sound: 'notification'
|
||||
icon: 'i51'
|
||||
sound: "notification"
|
||||
icon: "i51"
|
||||
cycles: 0
|
||||
priority: 'critical'
|
||||
icon_type: 'none'
|
||||
priority: "critical"
|
||||
icon_type: "none"
|
||||
```
|
||||
|
||||
### Only notify specific device
|
||||
@ -140,8 +140,8 @@ If you have more than one La Metric device, you can specify which will receive t
|
||||
message: "Son has arrived at school!"
|
||||
target: "Office LaMetric"
|
||||
data:
|
||||
sound: 'notification'
|
||||
icon: 'i51'
|
||||
sound: "notification"
|
||||
icon: "i51"
|
||||
```
|
||||
|
||||
If target is not specified, all LaMetric devices will be notified.
|
||||
|
@ -183,7 +183,7 @@ climates:
|
||||
description: "Measurement unit ([VAR_UNIT](#variables-and-units))."
|
||||
required: false
|
||||
type: string
|
||||
default: 'celsius'
|
||||
default: "celsius"
|
||||
min_temp:
|
||||
description: "Minimum target temperature."
|
||||
required: false
|
||||
@ -302,7 +302,7 @@ sensors:
|
||||
description: "Measurement unit ([VAR_UNIT](#variables-and-units))."
|
||||
required: false
|
||||
type: string
|
||||
default: 'native'
|
||||
default: "native"
|
||||
|
||||
switches:
|
||||
description: List of your switches.
|
||||
|
@ -53,7 +53,7 @@ However, if you want to fully control a light effect, you have to use its dedica
|
||||
```yaml
|
||||
script:
|
||||
colorloop_start:
|
||||
alias: 'Start colorloop'
|
||||
alias: "Start colorloop"
|
||||
sequence:
|
||||
- service: lifx.effect_colorloop
|
||||
data:
|
||||
|
@ -118,9 +118,9 @@ entity_id: media_player.chromecast
|
||||
service: media_player.play_media
|
||||
data:
|
||||
media_content_type: music
|
||||
media_content_id: 'https://fake-home-assistant.io.stream/aac'
|
||||
media_content_id: "https://fake-home-assistant.io.stream/aac"
|
||||
extra:
|
||||
thumb: 'https://brands.home-assistant.io/_/homeassistant/logo.png'
|
||||
thumb: "https://brands.home-assistant.io/_/homeassistant/logo.png"
|
||||
title: HomeAssitantRadio
|
||||
```
|
||||
|
||||
|
@ -42,8 +42,8 @@ To add Météo-France to your installation, add the following to your `configura
|
||||
```yaml
|
||||
# Example configuration.yaml entry for 2 cities
|
||||
meteo_france:
|
||||
- city: '76000'
|
||||
- city: 'Auch'
|
||||
- city: "76000"
|
||||
- city: "Auch"
|
||||
```
|
||||
|
||||
{% configuration %}
|
||||
|
@ -21,8 +21,8 @@ To enable this binary sensor, add the following lines to your `configuration.yam
|
||||
```yaml
|
||||
binary_sensor:
|
||||
- platform: meteoalarm
|
||||
country: 'NL'
|
||||
province: 'Groningen'
|
||||
country: "NL"
|
||||
province: "Groningen"
|
||||
```
|
||||
|
||||
{% configuration %}
|
||||
@ -43,7 +43,7 @@ language:
|
||||
description: "The 2 letters of your language, please be aware that this is only possible in the current country. So 'ne' is only possible in Netherlands. Possible options are: bu, bs, ce, da, de, ee, en, es, ga, ca, su, fr, gr, he, hr, ma, is, it, li, la, sr, mk, ma, ne, no, po, pt, ro, cp, sv, sl, eu."
|
||||
required: false
|
||||
type: string
|
||||
default: 'en'
|
||||
default: "en"
|
||||
{% endconfiguration %}
|
||||
|
||||
|
||||
|
@ -67,7 +67,7 @@ via the Frontend, a script, or the REST API.
|
||||
```yaml
|
||||
service: microsoft_face.create_group
|
||||
data:
|
||||
name: 'Family'
|
||||
name: "Family"
|
||||
```
|
||||
|
||||
- *microsoft_face.create_person*
|
||||
@ -77,7 +77,7 @@ data:
|
||||
service: microsoft_face.create_person
|
||||
data:
|
||||
group: family
|
||||
name: 'Hans Maier'
|
||||
name: "Hans Maier"
|
||||
```
|
||||
|
||||
You need to add an image of a person. You can add multiple images for every
|
||||
@ -90,7 +90,7 @@ send a local image to your Azure resource.
|
||||
service: microsoft_face.face_person
|
||||
data:
|
||||
group: family
|
||||
name: 'Hans Maier'
|
||||
name: "Hans Maier"
|
||||
camera_entity: camera.door
|
||||
```
|
||||
|
||||
|
@ -57,7 +57,7 @@ To use your Mi Flora plant sensor in your installation, add the following to you
|
||||
# Example configuration.yaml entry
|
||||
sensor:
|
||||
- platform: miflora
|
||||
mac: 'xx:xx:xx:xx:xx:xx'
|
||||
mac: "xx:xx:xx:xx:xx:xx"
|
||||
monitored_conditions:
|
||||
- moisture
|
||||
```
|
||||
@ -122,7 +122,7 @@ A full configuration example could look like the one below:
|
||||
# Example configuration.yaml entry
|
||||
sensor:
|
||||
- platform: miflora
|
||||
mac: 'xx:xx:xx:xx:xx:xx'
|
||||
mac: "xx:xx:xx:xx:xx:xx"
|
||||
name: Flower 1
|
||||
force_update: true
|
||||
median: 3
|
||||
|
@ -92,13 +92,13 @@ automation:
|
||||
event_data:
|
||||
event_type: created
|
||||
action:
|
||||
- delay: '00:00:01'
|
||||
- delay: "00:00:01"
|
||||
- service: minio.put
|
||||
data:
|
||||
file_path: "{{ trigger.event.data.path }}"
|
||||
bucket: "camera-image-object-detection"
|
||||
key: "input/{{ now().year }}/{{ (now().month | string).zfill(2) }}/{{ (now().day | string).zfill(2) }}/{{ trigger.event.data.file }}"
|
||||
- delay: '00:00:01'
|
||||
- delay: "00:00:01"
|
||||
- service: shell_command.remove_file
|
||||
data:
|
||||
file: "{{ trigger.event.data.path }}"
|
||||
|
@ -49,7 +49,7 @@ To use your Mi Temperature and Humidity sensor in your installation, add the fol
|
||||
# Example configuration.yaml entry
|
||||
sensor:
|
||||
- platform: mitemp_bt
|
||||
mac: 'xx:xx:xx:xx:xx:xx'
|
||||
mac: "xx:xx:xx:xx:xx:xx"
|
||||
monitored_conditions:
|
||||
- temperature
|
||||
```
|
||||
@ -118,7 +118,7 @@ A full configuration example could look like the one below:
|
||||
# Example configuration.yaml entry
|
||||
sensor:
|
||||
- platform: mitemp_bt
|
||||
mac: 'xx:xx:xx:xx:xx:xx'
|
||||
mac: "xx:xx:xx:xx:xx:xx"
|
||||
name: Kids Room Temp
|
||||
force_update: true
|
||||
median: 1
|
||||
|
@ -77,7 +77,7 @@ automation:
|
||||
action:
|
||||
service: notify.notify
|
||||
data:
|
||||
message: 'Call from {{ state_attr('sensor.modem_callerid', 'cid_name') }} at {{ state_attr('sensor.modem_callerid', 'cid_number') }} '
|
||||
message: "Call from {{ state_attr('sensor.modem_callerid', 'cid_name') }} at {{ state_attr('sensor.modem_callerid', 'cid_number') }} "
|
||||
- alias: Notify CallerID webui
|
||||
trigger:
|
||||
platform: state
|
||||
@ -87,7 +87,7 @@ automation:
|
||||
service: persistent_notification.create
|
||||
data:
|
||||
title: "Call from"
|
||||
message: '{{ state_attr('sensor.modem_callerid', 'cid_time').strftime("%I:%M %p") }} {{ state_attr('sensor.modem_callerid', 'cid_name') }} {{ state_attr('sensor.modem_callerid', 'cid_number') }} '
|
||||
message: "{{ state_attr('sensor.modem_callerid', 'cid_time').strftime("%I:%M %p") }} {{ state_attr('sensor.modem_callerid', 'cid_name') }} {{ state_attr('sensor.modem_callerid', 'cid_number') }} "
|
||||
- alias: Say CallerID
|
||||
trigger:
|
||||
platform: state
|
||||
@ -96,7 +96,7 @@ automation:
|
||||
action:
|
||||
service: tts.google_say
|
||||
data:
|
||||
message: 'Call from {{ state_attr('sensor.modem_callerid', 'cid_name') }}'
|
||||
message: "Call from {{ state_attr('sensor.modem_callerid', 'cid_name') }}"
|
||||
```
|
||||
|
||||
{% endraw %}
|
||||
|
@ -74,14 +74,14 @@ sensor:
|
||||
- station: Hauptbahnhof
|
||||
name: Hbf
|
||||
destinations: ['München Flughafen Terminal','Markt Schwaben']
|
||||
products: 'S-Bahn'
|
||||
products: "S-Bahn"
|
||||
timeoffset: 2
|
||||
- station: Sendlinger Tor
|
||||
lines: ['U2','U8']
|
||||
number: 5
|
||||
- station: Scheidplatz
|
||||
products: ['U-Bahn']
|
||||
directions: '1'
|
||||
directions: "1"
|
||||
```
|
||||
|
||||
The first sensor will return S-Bahn departures to Munich Airport or Markt Schwaben that are at least 2 minutes away.
|
||||
|
@ -20,7 +20,7 @@ Integrate your Serial, Ethernet (LAN) or MQTT MySensors Gateway by adding the fo
|
||||
# Example configuration.yaml entry
|
||||
mysensors:
|
||||
gateways:
|
||||
- device: '/dev/ttyUSB0'
|
||||
- device: "/dev/ttyUSB0"
|
||||
```
|
||||
|
||||
{% configuration %}
|
||||
@ -52,12 +52,12 @@ mysensors:
|
||||
description: Set the prefix of the MQTT topic for messages coming from the MySensors gateway in to Home Assistant.
|
||||
required: false
|
||||
type: string
|
||||
default: ''
|
||||
default: ""
|
||||
topic_out_prefix:
|
||||
description: Set the prefix of the MQTT topic for messages going from Home Assistant out to the MySensors gateway.
|
||||
required: false
|
||||
type: string
|
||||
default: ''
|
||||
default: ""
|
||||
nodes:
|
||||
description: A mapping of node ids to node settings, e.g., custom name.
|
||||
required: false
|
||||
@ -76,7 +76,7 @@ mysensors:
|
||||
description: Specifies the MySensors protocol version to use. Supports versions 1.4 to 2.3.
|
||||
required: false
|
||||
type: string
|
||||
default: '1.4'
|
||||
default: "1.4"
|
||||
optimistic:
|
||||
description: Enable or disable optimistic mode for actuators (switch/light). Set this to true if no state feedback from actuators is possible. Home Assistant will assume that the command succeeded and change state.
|
||||
required: false
|
||||
@ -116,28 +116,28 @@ The MQTT gateway requires MySensors version 2.0+ and only the MQTT client gatewa
|
||||
# Example configuration.yaml entry
|
||||
mysensors:
|
||||
gateways:
|
||||
- device: '/dev/ttyUSB0'
|
||||
persistence_file: 'path/mysensors.json'
|
||||
- device: "/dev/ttyUSB0"
|
||||
persistence_file: "path/mysensors.json"
|
||||
baud_rate: 38400
|
||||
nodes:
|
||||
1:
|
||||
name: 'kitchen'
|
||||
name: "kitchen"
|
||||
3:
|
||||
name: 'living_room'
|
||||
- device: '/dev/ttyACM0'
|
||||
persistence_file: 'path/mysensors2.json'
|
||||
name: "living_room"
|
||||
- device: "/dev/ttyACM0"
|
||||
persistence_file: "path/mysensors2.json"
|
||||
baud_rate: 115200
|
||||
- device: '192.168.1.18'
|
||||
persistence_file: 'path/mysensors3.json'
|
||||
- device: "192.168.1.18"
|
||||
persistence_file: "path/mysensors3.json"
|
||||
tcp_port: 5003
|
||||
- device: mqtt
|
||||
persistence_file: 'path/mysensors4.json'
|
||||
topic_in_prefix: 'mygateway1-out'
|
||||
topic_out_prefix: 'mygateway1-in'
|
||||
persistence_file: "path/mysensors4.json"
|
||||
topic_in_prefix: "mygateway1-out"
|
||||
topic_out_prefix: "mygateway1-in"
|
||||
optimistic: false
|
||||
persistence: true
|
||||
retain: true
|
||||
version: '2.0'
|
||||
version: "2.0"
|
||||
```
|
||||
|
||||
### Presentation
|
||||
|
@ -93,6 +93,6 @@ media_player:
|
||||
min_volume: -60
|
||||
max_volume: -20
|
||||
sources:
|
||||
1: 'Kodi'
|
||||
2: 'TV'
|
||||
1: "Kodi"
|
||||
2: "TV"
|
||||
```
|
||||
|
@ -29,10 +29,10 @@ sensor:
|
||||
from: Gn
|
||||
to: Mt
|
||||
via: Zl
|
||||
- name: 'AlmereBuiten-Duivendrecht-the-08h06m-train'
|
||||
- name: "AlmereBuiten-Duivendrecht-the-08h06m-train"
|
||||
from: Almb
|
||||
to: Dvd
|
||||
time: '08:06:00'
|
||||
time: "08:06:00"
|
||||
```
|
||||
|
||||
{% configuration %}
|
||||
|
@ -55,7 +55,7 @@ port:
|
||||
scan_interval:
|
||||
description: "Time interval between updates. Supported formats: `scan_interval: 'HH:MM:SS'`, `scan_interval: 'HH:MM'` and Time period dictionary (see example below)."
|
||||
required: false
|
||||
default: '00:01:00'
|
||||
default: "00:01:00"
|
||||
type: time
|
||||
infer_arming_state:
|
||||
description: Infer the disarmed arming state only via system status events. This works around a bug with some panels (`<v5.8`) which emit `update.status = []` when they are armed.
|
||||
|
@ -130,15 +130,15 @@ resources:
|
||||
# Example configuration.yaml entry
|
||||
sensor:
|
||||
- platform: netdata
|
||||
host: '192.168.1.2'
|
||||
port: '19999'
|
||||
host: "192.168.1.2"
|
||||
port: "19999"
|
||||
name: SomeHostName
|
||||
resources:
|
||||
system_load:
|
||||
data_group: system.load
|
||||
element: load15
|
||||
core0_freq:
|
||||
data_group: 'cpu.cpufreq'
|
||||
element: 'cpu0'
|
||||
data_group: "cpu.cpufreq"
|
||||
element: "cpu0"
|
||||
icon: mdi:chip
|
||||
```
|
||||
|
@ -193,11 +193,11 @@ automation:
|
||||
action:
|
||||
- service: conversation.process
|
||||
data:
|
||||
text: '{{ trigger.event.data.message }}'
|
||||
text: "{{ trigger.event.data.message }}"
|
||||
- service: netgear_lte.delete_sms
|
||||
data:
|
||||
host: '{{ trigger.event.data.host }}'
|
||||
sms_id: '{{ trigger.event.data.sms_id }}'
|
||||
host: "{{ trigger.event.data.host }}"
|
||||
sms_id: "{{ trigger.event.data.sms_id }}"
|
||||
```
|
||||
|
||||
{% endraw %}
|
||||
|
@ -35,16 +35,16 @@ The state is the last reading from Nightscout, and you can see other information
|
||||
### Example Automation
|
||||
|
||||
```yaml
|
||||
- id: '1234567890123'
|
||||
- id: "1234567890123"
|
||||
alias: overnight_low_kitchen_lights
|
||||
description: Turn on the lights in the kitchen if my blood sugar drops low overnight
|
||||
trigger:
|
||||
- below: '65'
|
||||
- below: "65"
|
||||
entity_id: sensor.blood_glucose
|
||||
platform: numeric_state
|
||||
condition: time
|
||||
after: '22:00:00'
|
||||
before: '06:00:00'
|
||||
after: "22:00:00"
|
||||
before: "06:00:00"
|
||||
action:
|
||||
- service: light.turn_on
|
||||
data:
|
||||
|
@ -83,7 +83,7 @@ You can use the `nissan_leaf.start_charge` service to send a request to the Niss
|
||||
```yaml
|
||||
- service: nissan_leaf.start_charge
|
||||
data:
|
||||
vin: '1HGBH41JXMN109186' # replace
|
||||
vin: "1HGBH41JXMN109186" # replace
|
||||
```
|
||||
|
||||
## Updating on-demand using Automation
|
||||
@ -92,19 +92,19 @@ You can also use the `nissan_leaf.update` service to request an on-demand update
|
||||
|
||||
```yaml
|
||||
- id: update_when_driver_not_home
|
||||
alias: 'Update when driver not home'
|
||||
alias: "Update when driver not home"
|
||||
initial_state: on
|
||||
trigger:
|
||||
- platform: time_pattern
|
||||
minutes: '/30'
|
||||
minutes: "/30"
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: device_tracker.drivername # replace
|
||||
state: 'not_home'
|
||||
state: "not_home"
|
||||
action:
|
||||
- service: nissan_leaf.update
|
||||
data:
|
||||
vin: '1HGBH41JXMN109186' # replace
|
||||
vin: "1HGBH41JXMN109186" # replace
|
||||
```
|
||||
|
||||
## Hints
|
||||
|
@ -21,7 +21,7 @@ action:
|
||||
service: notify.mysensors
|
||||
data:
|
||||
message: Welcome home!
|
||||
target: 'TextSensor 254 1'
|
||||
target: "TextSensor 254 1"
|
||||
```
|
||||
|
||||
The following sensor types are supported:
|
||||
|
@ -80,15 +80,15 @@ Now you can use the `notify.events` service inside your Home Assistant to:
|
||||
```yaml
|
||||
- service: notify.events
|
||||
data:
|
||||
message: 'Backyard motion detected!'
|
||||
message: "Backyard motion detected!"
|
||||
data:
|
||||
level: 'warning'
|
||||
priority: 'high'
|
||||
level: "warning"
|
||||
priority: "high"
|
||||
images:
|
||||
- name: 'local_photo.jpg'
|
||||
path: '/tmp/backyard_cam/motion.jpg'
|
||||
- name: 'remote_photo.jpg'
|
||||
url: 'https://i.ibb.co/Jt1845X/motion.jpg'
|
||||
- name: "local_photo.jpg"
|
||||
path: "/tmp/backyard_cam/motion.jpg"
|
||||
- name: "remote_photo.jpg"
|
||||
url: "https://i.ibb.co/Jt1845X/motion.jpg"
|
||||
```
|
||||
|
||||
### Message optional parameters
|
||||
|
@ -87,7 +87,7 @@ Depending on your personal circumstances with regards to bush fire risk you may
|
||||
# Example configuration.yaml entry
|
||||
geo_location:
|
||||
- platform: nsw_rural_fire_service_feed
|
||||
entity_namespace: 'nsw_fire_service_feed'
|
||||
entity_namespace: "nsw_fire_service_feed"
|
||||
radius: 10
|
||||
categories:
|
||||
- 'Emergency Warning'
|
||||
|
@ -20,7 +20,7 @@ Add a sensor to your `configuration.yaml` file as shown in the example:
|
||||
sensor:
|
||||
- platform: oasa_telematics
|
||||
route_id: YOUR_ROUTE_ID
|
||||
stop_id: 'YOUR_STOP_ID'
|
||||
stop_id: "YOUR_STOP_ID"
|
||||
```
|
||||
|
||||
The `route_id` can be obtained by looking up the "LineCode" of the route you want at this link:
|
||||
@ -60,5 +60,5 @@ A more extensive example on how to use this sensor:
|
||||
sensor:
|
||||
- platform: oasa_telematics
|
||||
route_id: 1965
|
||||
stop_id: '090006'
|
||||
stop_id: "090006"
|
||||
```
|
||||
|
@ -23,7 +23,7 @@ media_player:
|
||||
host: 192.168.1.2
|
||||
name: receiver
|
||||
sources:
|
||||
pc: 'HTPC'
|
||||
pc: "HTPC"
|
||||
```
|
||||
|
||||
If your receiver has second or third zone’s available, they are displayed as additional media players with the same functionality as the main zone.
|
||||
|
@ -97,7 +97,7 @@ sensor:
|
||||
platform: template
|
||||
sensors:
|
||||
garage_status:
|
||||
friendly_name: 'Honda Door Status'
|
||||
friendly_name: "Honda Door Status"
|
||||
value_template: '{% if states.cover.honda %}
|
||||
{% if states.cover.honda.attributes["door_state"] == "open" %}
|
||||
Open
|
||||
|
@ -45,14 +45,14 @@ To receive notifications of the entering flights using the [Home Assistant Compa
|
||||
|
||||
```yaml
|
||||
automation:
|
||||
- alias: 'Flight entry notification'
|
||||
- alias: "Flight entry notification"
|
||||
trigger:
|
||||
platform: event
|
||||
event_type: opensky_entry
|
||||
action:
|
||||
service: notify.mobile_app_<device_name>
|
||||
data:
|
||||
message: 'Flight entry of {{ trigger.event.data.callsign }}'
|
||||
message: "Flight entry of {{ trigger.event.data.callsign }}"
|
||||
```
|
||||
|
||||
{% endraw %}
|
||||
|
@ -94,7 +94,7 @@ automation:
|
||||
- alias: Update OpenUV every 30 minutes during the daytime
|
||||
trigger:
|
||||
platform: time_pattern
|
||||
minutes: '/30'
|
||||
minutes: "/30"
|
||||
condition:
|
||||
condition: and
|
||||
conditions:
|
||||
@ -115,11 +115,11 @@ automation:
|
||||
- alias: Update OpenUV every 20 minutes while the sun is at least 10 degrees above the horizon
|
||||
trigger:
|
||||
platform: time_pattern
|
||||
minutes: '/20'
|
||||
minutes: "/20"
|
||||
condition:
|
||||
condition: numeric_state
|
||||
entity_id: sun.sun
|
||||
value_template: '{{ state.attributes.elevation }}'
|
||||
value_template: "{{ state.attributes.elevation }}"
|
||||
above: 10
|
||||
action:
|
||||
service: openuv.update_uv_index_data
|
||||
@ -148,7 +148,7 @@ automation:
|
||||
- alias: Update OpenUV every hour (24 of 50 calls per day)
|
||||
trigger:
|
||||
platform: time_pattern
|
||||
minutes: '/60'
|
||||
minutes: "/60"
|
||||
action:
|
||||
service: openuv.update_data
|
||||
```
|
||||
|
@ -23,14 +23,14 @@ To enable Panel iFrames in your installation, add the following to your `configu
|
||||
# Example configuration.yaml entry
|
||||
panel_iframe:
|
||||
router:
|
||||
title: 'Router'
|
||||
url: 'http://192.168.1.1'
|
||||
title: "Router"
|
||||
url: "http://192.168.1.1"
|
||||
fridge:
|
||||
title: 'Fridge'
|
||||
url: 'http://192.168.1.5'
|
||||
title: "Fridge"
|
||||
url: "http://192.168.1.5"
|
||||
otherapp:
|
||||
title: 'Other App'
|
||||
url: '/otherapp'
|
||||
title: "Other App"
|
||||
url: "/otherapp"
|
||||
```
|
||||
|
||||
{% configuration %}
|
||||
|
@ -70,7 +70,7 @@ action:
|
||||
This automation example shows a notification when the Z-Wave network is starting and removes it when the network is ready.
|
||||
|
||||
```yaml
|
||||
- alias: 'Z-Wave network is starting'
|
||||
- alias: "Z-Wave network is starting"
|
||||
trigger:
|
||||
- platform: event
|
||||
event_type: zwave.network_start
|
||||
@ -81,7 +81,7 @@ This automation example shows a notification when the Z-Wave network is starting
|
||||
message: "Z-Wave network is starting..."
|
||||
notification_id: zwave
|
||||
|
||||
- alias: 'Z-Wave network is ready'
|
||||
- alias: "Z-Wave network is ready"
|
||||
trigger:
|
||||
- platform: event
|
||||
event_type: zwave.network_ready
|
||||
|
@ -68,23 +68,23 @@ Single Pi-hole running via Home Assistant add-on:
|
||||
|
||||
```yaml
|
||||
pi_hole:
|
||||
- host: 'localhost:4865'
|
||||
- host: "localhost:4865"
|
||||
```
|
||||
|
||||
Multiple Pi-holes:
|
||||
|
||||
```yaml
|
||||
pi_hole:
|
||||
- host: '192.168.0.2'
|
||||
- host: '192.168.0.3'
|
||||
name: 'Secondary Pi-hole'
|
||||
- host: "192.168.0.2"
|
||||
- host: "192.168.0.3"
|
||||
name: "Secondary Pi-hole"
|
||||
```
|
||||
|
||||
Pi-hole with a self-signed certificate:
|
||||
|
||||
```yaml
|
||||
pi_hole:
|
||||
- host: 'pi.hole'
|
||||
- host: "pi.hole"
|
||||
ssl: true
|
||||
verify_ssl: false
|
||||
```
|
||||
@ -93,7 +93,7 @@ Pi-hole with an `api_key` that allows it to be enabled or disabled:
|
||||
|
||||
```yaml
|
||||
pi_hole:
|
||||
- host: 'pi.hole'
|
||||
- host: "pi.hole"
|
||||
api_key: !secret pi_hole_api_key
|
||||
```
|
||||
|
||||
|
@ -46,5 +46,5 @@ The configuration sample below shows how an entry can look like:
|
||||
# Example configuration.yaml entry
|
||||
tts:
|
||||
- platform: picotts
|
||||
language: 'fr-FR'
|
||||
language: "fr-FR"
|
||||
```
|
||||
|
@ -85,7 +85,7 @@ To enable a Pilight binary sensor in your installation, add the following to you
|
||||
# Example configuration.yaml entry
|
||||
binary_sensor:
|
||||
- platform: pilight
|
||||
variable: 'state'
|
||||
variable: "state"
|
||||
```
|
||||
|
||||
{% configuration %}
|
||||
@ -133,11 +133,11 @@ A full configuration example could look like this:
|
||||
# Example configuration.yaml entry
|
||||
binary_sensor:
|
||||
- platform: pilight
|
||||
name: 'Motion'
|
||||
variable: 'state'
|
||||
name: "Motion"
|
||||
variable: "state"
|
||||
payload:
|
||||
unitcode: 371399
|
||||
payload_on: 'closed'
|
||||
payload_on: "closed"
|
||||
disarm_after_trigger: true
|
||||
reset_delay_sec: 30
|
||||
```
|
||||
@ -154,7 +154,7 @@ sensor:
|
||||
- platform: pilight
|
||||
variable: temperature
|
||||
payload:
|
||||
uuid: '0000-b8-27-eb-f447d3'
|
||||
uuid: "0000-b8-27-eb-f447d3"
|
||||
```
|
||||
|
||||
{% configuration %}
|
||||
@ -185,23 +185,23 @@ This section shows a real life example how to use values of a weather station.
|
||||
# Example configuration.yaml entry
|
||||
sensor:
|
||||
- platform: pilight
|
||||
name: 'Temperature'
|
||||
variable: 'temperature'
|
||||
name: "Temperature"
|
||||
variable: "temperature"
|
||||
payload:
|
||||
uuid: 0000-b8-27-eb-f1f72e
|
||||
unit_of_measurement: '°C'
|
||||
unit_of_measurement: "°C"
|
||||
- platform: pilight
|
||||
name: 'Humidity'
|
||||
variable: 'humidity'
|
||||
name: "Humidity"
|
||||
variable: "humidity"
|
||||
payload:
|
||||
uuid: 0000-b8-27-eb-f1f72e
|
||||
unit_of_measurement: '%'
|
||||
unit_of_measurement: "%"
|
||||
- platform: pilight
|
||||
name: 'Battery'
|
||||
variable: 'battery'
|
||||
name: "Battery"
|
||||
variable: "battery"
|
||||
payload:
|
||||
uuid: 0000-b8-27-eb-f1f72e
|
||||
unit_of_measurement: '%'
|
||||
unit_of_measurement: "%"
|
||||
```
|
||||
|
||||
## Switch
|
||||
@ -298,13 +298,13 @@ switch:
|
||||
systemcode: 14462
|
||||
unit: 6
|
||||
id: 34
|
||||
state: 'on'
|
||||
state: "on"
|
||||
off_code_receive:
|
||||
protocol: daycom
|
||||
systemcode: 14462
|
||||
unit: 6
|
||||
id: 34
|
||||
state: 'off'
|
||||
state: "off"
|
||||
```
|
||||
|
||||
## Light
|
||||
@ -349,12 +349,12 @@ light:
|
||||
protocol: kaku_dimmer
|
||||
id: 23298822
|
||||
unit: 10
|
||||
state: 'on'
|
||||
state: "on"
|
||||
off_code_receive:
|
||||
protocol: kaku_dimmer
|
||||
id: 23298822
|
||||
unit: 10
|
||||
state: 'off'
|
||||
state: "off"
|
||||
```
|
||||
|
||||
## Troubleshooting
|
||||
|
@ -142,28 +142,28 @@ sensor:
|
||||
- platform: mqtt
|
||||
name: my_plant_moisture
|
||||
state_topic: my_plant_topic
|
||||
value_template: '{{ value_json.moisture | int }}'
|
||||
unit_of_measurement: '%'
|
||||
value_template: "{{ value_json.moisture | int }}"
|
||||
unit_of_measurement: "%"
|
||||
- platform: mqtt
|
||||
name: my_plant_battery
|
||||
state_topic: my_plant_topic
|
||||
value_template: '{{ value_json.battery | int }}'
|
||||
unit_of_measurement: '%'
|
||||
value_template: "{{ value_json.battery | int }}"
|
||||
unit_of_measurement: "%"
|
||||
- platform: mqtt
|
||||
name: my_plant_temperature
|
||||
state_topic: my_plant_topic
|
||||
value_template: '{{ value_json.temperature | float }}'
|
||||
unit_of_measurement: '°C'
|
||||
value_template: "{{ value_json.temperature | float }}"
|
||||
unit_of_measurement: "°C"
|
||||
- platform: mqtt
|
||||
name: my_plant_conductivity
|
||||
state_topic: my_plant_topic
|
||||
value_template: '{{ value_json.conductivity | int }}'
|
||||
unit_of_measurement: 'µS/cm'
|
||||
value_template: "{{ value_json.conductivity | int }}"
|
||||
unit_of_measurement: "µS/cm"
|
||||
- platform: mqtt
|
||||
name: my_plant_brightness
|
||||
state_topic: my_plant_topic
|
||||
value_template: '{{ value_json.brightness | int }}'
|
||||
unit_of_measurement: 'Lux'
|
||||
value_template: "{{ value_json.brightness | int }}"
|
||||
unit_of_measurement: "Lux"
|
||||
```
|
||||
|
||||
{% endraw %}
|
||||
|
@ -247,17 +247,17 @@ play_plex_on_tv:
|
||||
- service: media_player.select_source
|
||||
entity_id: media_player.smart_tv
|
||||
data:
|
||||
source: 'Plex'
|
||||
source: "Plex"
|
||||
- wait_template: "{{ is_state('media_player.smart_tv', 'On') }}"
|
||||
timeout: '00:00:10'
|
||||
timeout: "00:00:10"
|
||||
- service: plex.scan_for_clients
|
||||
- wait_template: "{{ not is_state('media_player.plex_smart_tv', 'unavailable') }}"
|
||||
timeout: '00:00:10'
|
||||
timeout: "00:00:10"
|
||||
continue_on_timeout: false
|
||||
- service: media_player.play_media
|
||||
data:
|
||||
entity_id: media_player.plex_smart_tv
|
||||
media_content_id: '{"library_name": "Movies", "title": "Zoolander"}'
|
||||
media_content_id: "{"library_name": "Movies", "title": "Zoolander"}"
|
||||
media_content_type: movie
|
||||
```
|
||||
|
||||
|
@ -100,7 +100,7 @@ automation:
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: binary_sensor.point_button_press # Change this accordingly
|
||||
to: 'on'
|
||||
to: "on"
|
||||
action:
|
||||
- service: persistent_notification.create
|
||||
data:
|
||||
|
@ -157,7 +157,7 @@ You can then configure Prometheus to fetch metrics from Home Assistant by adding
|
||||
|
||||
```yaml
|
||||
# Example Prometheus scrape_configs entry
|
||||
- job_name: 'hass'
|
||||
- job_name: "hass"
|
||||
scrape_interval: 60s
|
||||
metrics_path: /api/prometheus
|
||||
|
||||
@ -166,7 +166,7 @@ You can then configure Prometheus to fetch metrics from Home Assistant by adding
|
||||
api_password: ['PASSWORD']
|
||||
|
||||
# Long-Lived Access Token
|
||||
bearer_token: 'your.longlived.token'
|
||||
bearer_token: "your.longlived.token"
|
||||
|
||||
scheme: https
|
||||
static_configs:
|
||||
|
@ -58,21 +58,21 @@ sensor:
|
||||
- platform: template
|
||||
sensors:
|
||||
power_consumption:
|
||||
value_template: '{% if is_state_attr("sensor.pvoutput", "power_consumption", "NaN") %}0{% else %}{{ state_attr("sensor.pvoutput", "power_consumption") }}{% endif %}'
|
||||
friendly_name: 'Using'
|
||||
unit_of_measurement: 'Watt'
|
||||
value_template: "{% if is_state_attr("sensor.pvoutput", "power_consumption", "NaN") %}0{% else %}{{ state_attr("sensor.pvoutput", "power_consumption") }}{% endif %}"
|
||||
friendly_name: "Using"
|
||||
unit_of_measurement: "Watt"
|
||||
energy_consumption:
|
||||
value_template: '{{ "%0.1f"|format(state_attr("sensor.pvoutput", "energy_consumption")|float/1000) }}'
|
||||
friendly_name: 'Used'
|
||||
unit_of_measurement: 'kWh'
|
||||
friendly_name: "Used"
|
||||
unit_of_measurement: "kWh"
|
||||
power_generation:
|
||||
value_template: '{% if is_state_attr("sensor.pvoutput", "power_generation", "NaN") %}0{% else %}{{ state_attr("sensor.pvoutput", "power_generation") }}{% endif %}'
|
||||
friendly_name: 'Generating'
|
||||
unit_of_measurement: 'Watt'
|
||||
friendly_name: "Generating"
|
||||
unit_of_measurement: "Watt"
|
||||
energy_generation:
|
||||
value_template: '{% if is_state_attr("sensor.pvoutput", "energy_generation", "NaN") %}0{% else %}{{ "%0.2f"|format(state_attr("sensor.pvoutput", "energy_generation")|float/1000) }}{% endif %}'
|
||||
friendly_name: 'Generated'
|
||||
unit_of_measurement: 'kWh'
|
||||
friendly_name: "Generated"
|
||||
unit_of_measurement: "kWh"
|
||||
```
|
||||
|
||||
{% endraw %}
|
||||
|
@ -24,7 +24,7 @@ To enable this sensor, add the following lines to your `configuration.yaml`:
|
||||
# Example configuration.yaml entry
|
||||
sensor:
|
||||
- platform: qbittorrent
|
||||
url: 'http://<hostname>:<port>'
|
||||
url: "http://<hostname>:<port>"
|
||||
username: YOUR_USERNAME
|
||||
password: YOUR_PASSWORD
|
||||
```
|
||||
|
@ -123,7 +123,7 @@ automation:
|
||||
- alias: Turn irrigation on
|
||||
trigger:
|
||||
platform: time
|
||||
at: '5:30:00'
|
||||
at: "5:30:00"
|
||||
action:
|
||||
service: rainbird.start_irrigation
|
||||
entity_id: switch.sprinkler_1
|
||||
|
@ -24,8 +24,8 @@ To enable this switch, add the following lines to your `configuration.yaml`:
|
||||
# Example configuration.yaml entry
|
||||
switch:
|
||||
- platform: recswitch
|
||||
host: 'IP_ADDRESS'
|
||||
mac: 'MAC_ADDRESS'
|
||||
host: "IP_ADDRESS"
|
||||
mac: "MAC_ADDRESS"
|
||||
```
|
||||
|
||||
{% configuration %}
|
||||
|
@ -20,7 +20,7 @@ Add a sensor to your `configuration.yaml` file as shown in the example:
|
||||
# Example configuration.yaml entry
|
||||
sensor:
|
||||
- platform: rejseplanen
|
||||
stop_id: 'YOUR_STOP_ID'
|
||||
stop_id: "YOUR_STOP_ID"
|
||||
```
|
||||
|
||||
{% configuration %}
|
||||
@ -94,7 +94,7 @@ A working example on how to use this sensor with direction:
|
||||
# Example configuration.yaml entry with the correct use of direction.
|
||||
sensor:
|
||||
- platform: rejseplanen
|
||||
stop_id: '713000702'
|
||||
stop_id: "713000702"
|
||||
direction:
|
||||
- 'Bjergegårdsvej/Rylevej (Favrskov Kom)'
|
||||
- 'Skanderborg Busterminal (Skanderborg Kom)'
|
||||
@ -126,9 +126,9 @@ A more extensive example on how to use this sensor:
|
||||
# Example configuration.yaml entry
|
||||
sensor:
|
||||
- platform: rejseplanen
|
||||
name: 'Elmegade 350S'
|
||||
stop_id: '000045740'
|
||||
route: 'Bus 350S'
|
||||
name: "Elmegade 350S"
|
||||
stop_id: "000045740"
|
||||
route: "Bus 350S"
|
||||
direction:
|
||||
- 'Herlev St.'
|
||||
- 'Ballerup St.'
|
||||
|
@ -27,7 +27,7 @@ sensor:
|
||||
- platform: rest
|
||||
resource: http://IP_ADDRESS/ENDPOINT
|
||||
method: POST
|
||||
payload: '{ "device" : "heater" }'
|
||||
payload: "{ "device" : "heater" }"
|
||||
```
|
||||
|
||||
or a template based request:
|
||||
|
@ -19,7 +19,7 @@ To use this component, add the following lines to your `configuration.yaml` file
|
||||
# Example configuration.yaml entry
|
||||
rest_command:
|
||||
example_request:
|
||||
url: 'http://example.com/'
|
||||
url: "http://example.com/"
|
||||
```
|
||||
|
||||
{% configuration %}
|
||||
@ -105,7 +105,7 @@ rest_command:
|
||||
method: POST
|
||||
headers:
|
||||
authorization: !secret rest_headers_secret
|
||||
accept: 'application/json, text/html'
|
||||
accept: "application/json, text/html"
|
||||
user-agent: 'Mozilla/5.0 {{ useragent }}'
|
||||
payload: '{"profile":{"status_text": "{{ status }}","status_emoji": "{{ emoji }}"}}'
|
||||
content_type: 'application/json; charset=utf-8'
|
||||
@ -129,7 +129,7 @@ Call the new service from [developer tools](/docs/tools/dev-tools/) in the sideb
|
||||
|
||||
```yaml
|
||||
automation:
|
||||
- alias: 'Arrive at Work'
|
||||
- alias: "Arrive at Work"
|
||||
trigger:
|
||||
platform: zone
|
||||
entity_id: device_tracker.my_device
|
||||
|
@ -210,7 +210,7 @@ script:
|
||||
sequence:
|
||||
- condition: state
|
||||
entity_id: switch.pushover_notifications
|
||||
state: 'on'
|
||||
state: "on"
|
||||
- service: notify.pushover
|
||||
data:
|
||||
title: "{% raw %}{{ title }}{% endraw %}"
|
||||
|
@ -125,18 +125,18 @@ The actual linking can be realized by two automation rules. One rule to control
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: light.led_push_button_10
|
||||
state: 'on'
|
||||
state: "on"
|
||||
- condition: state
|
||||
entity_id: light.living
|
||||
state: 'off'
|
||||
state: "off"
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: light.led_push_button_10
|
||||
state: 'off'
|
||||
state: "off"
|
||||
- condition: state
|
||||
entity_id: light.living
|
||||
state: 'on'
|
||||
state: "on"
|
||||
- entity_id: light.led_push_button_10
|
||||
service: light.toggle
|
||||
```
|
||||
|
@ -138,7 +138,7 @@ automation:
|
||||
condition:
|
||||
condition: state
|
||||
entity_id: 'binary_sensor.workday_sensor'
|
||||
state: 'on'
|
||||
state: "on"
|
||||
action:
|
||||
service: switch.turn_on
|
||||
entity_id: switch.heater
|
||||
|
@ -591,9 +591,9 @@ elements:
|
||||
- type: conditional
|
||||
conditions:
|
||||
- entity: sensor.presence_daughter
|
||||
state: 'home'
|
||||
state: "home"
|
||||
- entity: sensor.presence_dad
|
||||
state: 'not_home'
|
||||
state: "not_home"
|
||||
elements:
|
||||
- type: state-icon
|
||||
entity: switch.tv
|
||||
|
Loading…
x
Reference in New Issue
Block a user