Update time_pattern docs (#8263)

* Cleanup time_pattern

* Update sensor.tibber.markdown
This commit is contained in:
Alok Saboo 2019-01-24 19:01:49 -05:00 committed by Klaas Schoute
parent 2a88f9c778
commit b0ca7bcd09
11 changed files with 24 additions and 33 deletions

View File

@ -180,7 +180,7 @@ calendar:
alias: worktime wakeup alias: worktime wakeup
trigger: trigger:
platform: time platform: time
at: 06:40:00 at: '06:40:00'
action: action:
- service: media_player.media_play - service: media_player.media_play
entity_id: media_player.bedroom entity_id: media_player.bedroom

View File

@ -77,7 +77,7 @@ Check our [community forums](https://community.home-assistant.io/c/projects/them
There are 2 themes-related services: There are 2 themes-related services:
- `frontend.reload_themes`: reloads theme configuration from your `configuration.yaml` file. - `frontend.reload_themes`: reloads theme configuration from your `configuration.yaml` file.
- `frontend.set_theme(name)`: sets backend-preferred theme name. - `frontend.set_theme(name)`: sets backend-preferred theme name.
Example in automation: Example in automation:
@ -96,7 +96,7 @@ automation:
name: happy name: happy
``` ```
To enable "night mode": To enable "night mode":
```yaml ```yaml
automation: automation:
@ -104,7 +104,7 @@ automation:
initial_state: true initial_state: true
trigger: trigger:
- platform: time - platform: time
at: '21:00' at: '21:00:00'
action: action:
- service: frontend.set_theme - service: frontend.set_theme
data: data:

View File

@ -67,7 +67,7 @@ devices:
{% endconfiguration %} {% endconfiguration %}
<p class='note'> <p class='note'>
Depending on your controller or bulb type, there are two ways to configure brightness. Depending on your controller or bulb type, there are two ways to configure brightness.
The component defaults to rgbw. If your device has a separate white channel, you do not need to specify anything else; changing the white value will adjust the brightness of white channel keeping rgb color constant. However, if your device does not have a separate white channel, you will need to set the mode to rgb. In this mode, the device will keep the same color, and adjust the rgb values to dim or brighten the color. The component defaults to rgbw. If your device has a separate white channel, you do not need to specify anything else; changing the white value will adjust the brightness of white channel keeping rgb color constant. However, if your device does not have a separate white channel, you will need to set the mode to rgb. In this mode, the device will keep the same color, and adjust the rgb values to dim or brighten the color.
</p> </p>
@ -98,7 +98,7 @@ light:
automation: automation:
alias: random_flux_living_room_lamp alias: random_flux_living_room_lamp
trigger: trigger:
platform: time platform: time_pattern
seconds: '/45' seconds: '/45'
action: action:
service: light.turn_on service: light.turn_on

View File

@ -142,8 +142,7 @@ automation:
- alias: Update OpenUV every 30 minutes during the daytime - alias: Update OpenUV every 30 minutes during the daytime
trigger: trigger:
platform: time_pattern platform: time_pattern
minutes: "/30" minutes: '/30'
seconds: 00
condition: condition:
condition: and condition: and
conditions: conditions:
@ -164,8 +163,7 @@ automation:
- alias: Update OpenUV every hour (24 of 50 calls per day) - alias: Update OpenUV every hour (24 of 50 calls per day)
trigger: trigger:
platform: time_pattern platform: time_pattern
minutes: "/60" minutes: '/60'
seconds: 00
action: action:
service: openuv.update_data service: openuv.update_data
``` ```

View File

@ -146,9 +146,8 @@ You can also use the `sensor.google_travel_sensor_update` service to update the
alias: "Commute - Update morning commute sensor" alias: "Commute - Update morning commute sensor"
initial_state: 'on' initial_state: 'on'
trigger: trigger:
- platform: time - platform: time_pattern
minutes: '/2' minutes: '/2'
seconds: 00
condition: condition:
- condition: time - condition: time
after: '08:00:00' after: '08:00:00'

View File

@ -286,9 +286,8 @@ sensor:
automation: automation:
- alias: 'nonsmoker_update' - alias: 'nonsmoker_update'
trigger: trigger:
- platform: time - platform: time_pattern
minutes: '/5' minutes: '/5'
seconds: 0
action: action:
- service: homeassistant.update_entity - service: homeassistant.update_entity
entity_id: sensor.nonsmoker entity_id: sensor.nonsmoker

View File

@ -31,10 +31,9 @@ The electricity price can be used to make automations. The sensor has a `max_pri
```yaml ```yaml
- alias: "Electricity price" - alias: "Electricity price"
trigger: trigger:
platform: time platform: time_pattern
# Matches every hour at 1 minutes past whole # Matches every hour at 1 minutes past whole
minutes: 1 minutes: 1
seconds: 00
condition: condition:
condition: template condition: template
value_template: '{{ float(states.sensor.electricity_price_hamretunet_10.state) > 0.9 * float(states.sensor.electricity_price_hamretunet_10.attributes.max_price) }}' value_template: '{{ float(states.sensor.electricity_price_hamretunet_10.state) > 0.9 * float(states.sensor.electricity_price_hamretunet_10.attributes.max_price) }}'

View File

@ -30,8 +30,8 @@ automation:
- alias: Enable First Morning Trigger - alias: Enable First Morning Trigger
trigger: trigger:
- platform: time - platform: time
at: '5:00' at: '05:00:00'
action: action:
service: homeassistant.turn_on service: homeassistant.turn_on
entity_id: input_boolean.trigger_first_morning entity_id: input_boolean.trigger_first_morning
@ -41,12 +41,12 @@ automation:
- platform: sun - platform: sun
event: sunrise event: sunrise
offset: "01:00:00" offset: "01:00:00"
action: action:
service: homeassistant.turn_off service: homeassistant.turn_off
entity_id: input_boolean.trigger_first_morning entity_id: input_boolean.trigger_first_morning
# This is the main automation. It triggers when my motion sensor is triggered # This is the main automation. It triggers when my motion sensor is triggered
# (in this case, a motion sensor from a security system attached to my Vera) # (in this case, a motion sensor from a security system attached to my Vera)
- alias: First Morning Motion - alias: First Morning Motion
@ -59,17 +59,17 @@ automation:
condition: state condition: state
entity_id: input_boolean.trigger_first_morning entity_id: input_boolean.trigger_first_morning
state: 'on' state: 'on'
action: action:
# turn off the "waiting" boolean regardless of whether lights will turn on # turn off the "waiting" boolean regardless of whether lights will turn on
# so that this happens only once # so that this happens only once
- service: homeassistant.turn_off - service: homeassistant.turn_off
entity_id: input_boolean.trigger_first_morning entity_id: input_boolean.trigger_first_morning
# But only turn on lights if the living room and kitchen lights are off or dimmed # But only turn on lights if the living room and kitchen lights are off or dimmed
# If a condition tests false, the automation will end # If a condition tests false, the automation will end
- condition: and - condition: and
conditions: conditions:
- condition: numeric_state - condition: numeric_state
entity_id: light.livingroom_ec entity_id: light.livingroom_ec
# if light is off, force a 0, otherwise use the brightness value # if light is off, force a 0, otherwise use the brightness value
@ -84,13 +84,13 @@ automation:
entity_id: light.kitchen_ceiling entity_id: light.kitchen_ceiling
value_template: {% raw %}'{% if states.light.kitchen_ceiling.state == "on" %}{{ states.light.kitchen_ceiling.attributes.brightness }}{% else %}0{% endif %}'{% endraw %} value_template: {% raw %}'{% if states.light.kitchen_ceiling.state == "on" %}{{ states.light.kitchen_ceiling.attributes.brightness }}{% else %}0{% endif %}'{% endraw %}
below: 128 below: 128
# Trigger a scene # Trigger a scene
# You could add as many services or scenes as you'd like # You could add as many services or scenes as you'd like
- service: scene.turn_on - service: scene.turn_on
entity_id: scene.morning_first_motion entity_id: scene.morning_first_motion
``` ```
#### {% linkable_title The Scene %} #### {% linkable_title The Scene %}
@ -98,7 +98,7 @@ automation:
Here is the Scene that is called via the Automations above. Here is the Scene that is called via the Automations above.
```yaml ```yaml
# here's the scene that gets called. Lights in # here's the scene that gets called. Lights in
# my living room and kitchen turn on. # my living room and kitchen turn on.
scene: scene:
- name: Morning First Motion - name: Morning First Motion

View File

@ -25,9 +25,8 @@ automation:
# Changes Hue light every two minutes to random color if input boolean is set to on # 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: trigger:
platform: time platform: time_pattern
minutes: '/2' minutes: '/2'
seconds: 0
condition: condition:
condition: state condition: state
entity_id: input_boolean.loop_livingcolors entity_id: input_boolean.loop_livingcolors

View File

@ -36,5 +36,3 @@ automation:
data: data:
message: 'Time for lunch' message: 'Time for lunch'
``` ```

View File

@ -54,9 +54,8 @@ rest_command:
automation: automation:
alias: HTTP to MQTT keep alive alias: HTTP to MQTT keep alive
trigger: trigger:
platform: time platform: time_pattern
minutes: '/10' minutes: '/10'
seconds: 00
condition: condition:
condition: time condition: time
after: '7:30:00' after: '7:30:00'