Fabian Affolter 481320128f Re-organisation Documentation and Getting started (#2055)
* Split MQTT documentation

* Add more details

* Move content to /docs

* Enable sidebar

* Move content to /docs

* Enable sidebar

* Move content

* Update links

* Remove wizard stuff

* Enable sidebar

* Minor changes

* Move MQTT parts to /docs

* update links

* Update links and sync content

* Fix link

* Enable sidebar

* Remove navigation

* Remove navigation and other minor updates

* Update links

* Add overview page

* Make title linkable

* Update

* Plit content

* Update links

* Rearrange content

* New getting-started section

* Add icons for docs

* Update for new structure

* Update for new structure

* Add docs navigation

* Add docs overview page

* Remove ecosystem navigation

* Add docs and remove other collections

* Move ecosystem to docs

* Remove duplicate files

* Re-add ecosystem overview

* Move to ecosystem

* Fix permission

* Update navigation

* Remove collection

* Move overview to right folder

* Move mqtt to upper level

* Move notebook to ecosystem

* Remove un-used files

* Add one more rectangle for iOS

* Move two parts back from docs and rename Run step

* Remove colon

* update getting-started section

* Add redirect

* Update

* Update navigation
2017-02-23 11:09:41 +01:00

1.3 KiB

layout title description date sidebar comments sharing footer redirect_from
page Automation Conditions Automations can test conditions when invoked. 2016-04-24 08:30 +0100 true false true true /getting-started/automation-condition/

Conditions are an optional part of an automation rule and can be used to prevent an action from happening when triggered. Conditions look very similar to triggers but are very different. A trigger will look at events happening in the system while a condition only looks at how the system looks right now. A trigger can observe that a switch is being turned on. A condition can only see if a switch is currently on or off.

The available conditions for an automation are the same as for the script syntax so see that page for a full list of available conditions.

Example of using condition:

- alias: 'Enciende Despacho'
  trigger:
    platform: state
    entity_id: sensor.mini_despacho
    to: 'on'
  condition:
    condition: or
    conditions:
      - condition: template
        value_template: '{% raw %}{{ states.sun.sun.attributes.elevation < 4 }}{% endraw %}'
      - condition: template
        value_template: '{% raw %}{{ states.sensor.sensorluz_7_0.state < 10 }}{% endraw %}'
  action:
    - service: scene.turn_on
      entity_id: scene.DespiertaDespacho