Help with automation in the new version

hi,

I want to have 3 simple automations… using the GUI it seems for the first one i cant do much…

i want to be turn on a light outside from 7PM to 6AM, i tried the below in automations.yaml…

- alias: Turn on outside light at 7.30 pm
  trigger:
    platform: time
    at: "\u201919:30:00'"
  action:
    service: homeassistant.turn_on
    entity_id: switch.outside_lamp_switch_5_0
- alias: Turn off outside light at 6.30 am
  trigger:
    platform: time
    at: "\u20196:30:00'"
  action:
    service: homeassistant.turn_off
    entity_id: switch.outside_lamp_switch_5_0

The next automation i wanted to do was turning on a light on motion and off with no motion after 10 minutes…

this I was able to do using the GUI but seems to not “get the” entity value stored…

here is what i have in automations.yaml for light on.

- action:
  - alias: Turn Kitchen Light on
    service: homeassistant.turn_on
  alias: Turn on kitchen light when there is movement
  id: '1498720140946'
  trigger:
  - entity_id: binary_sensor.linear_wapirz1_motion_sensor_sensor_8_0
    platform: state
    to: 'on'

i tried to follow documentation but seems doing something incorrectly…

please help.

Thanks,

1 Like

First thing for the sake of readability, please use code blocks and syntax highlighting.

Could you please explain what works and what doesn’t?

Also, I’m not sure you’re allowed to have . (dots) in the alias. It might silently error.

sorry i was not near a system so couldnt update the post…

The below does not work.

- alias: Turn on outside light at 7.30 pm
  trigger:
    platform: time
    at: "\u201919:30:00'"
  action:
    service: homeassistant.turn_on
    entity_id: switch.outside_lamp_switch_5_0
- alias: Turn off outside light at 6.30 am
  trigger:
    platform: time
    at: "\u20196:30:00'"
  action:
    service: homeassistant.turn_off
    entity_id: switch.outside_lamp_switch_5_0

This also does not work.

The next automation i wanted to do was turning on a light on motion and off with no motion after 10 minutes…

this I was able to do using the GUI but seems to not “get the” entity value stored…

here is what i have in automations.yaml for light on.

- action:
  - alias: Turn Kitchen Light on
    service: homeassistant.turn_on
  alias: Turn on kitchen light when there is movement
  id: '1498720140946'
  trigger:
  - entity_id: binary_sensor.linear_wapirz1_motion_sensor_sensor_8_0
    platform: state
    to: 'on'

THanks,

thanks, I’ll remove the dots and try.

See if this works for you.

- alias: Turn on outside light at dusk
  trigger:
    platform: time
    at: '19:30:00'
  action:
    service: homeassistant.turn_on
    entity_id: switch.outside_lamp_switch_5_0

- alias: Turn off outside light at dawn
  trigger:
    platform: time
    at: '6:30:00'
  action:
    service: homeassistant.turn_off
    entity_id: switch.outside_lamp_switch_5_0

thanks! that works…

so for the monition sensor i am puzzled as its status shows as Sleeping (cache load) under the zwave bubble… everything else shows ready…

As you’ve marked this thread as solved and your new question is unrelated to your original issue I’d suggest you open a new thread.

no problem, the reason i asked here is because that “Sensor” is related to the other automation i was trying to do with the GUI …

when motion turn lights on… turn off after 10 mins of no motion.

Check this link for your automation. This might give you an idea.

thank you!.

1 Like

@jayha Battery devices will show as sleeping. In the case of a motion sensor, it will always respond to a motion event, and wake up the Zwave radio to report to HA. Since motion can be almost continuous, motion sensors usually have a timeout value, something like 4 or 5 minutes between times that they wake up the Zwave radio to report. Each new motion event will reset the timeout. 5 minutes (or what ever value set in the sensor) after the last motion event, the sensor wakes up the Zwave radio and notifies HA that there is no motion. A motion event immediately wakes the Zwave radio to report. You need to have a look at your documentation for the motion sensor to see what the timeout value is and make sure the timeout in your automation is at least as long as the timeout in the sensor.

1 Like

thanks, I will check the documentation and see if I can adjust the values…

is there a way in the automation with the action i can add a TTS to play from sonos?

i was controlling the sonos from ha and when i entered text under TTS it seemed to work very well…

i would prefer to have “hard coded txt” in specific actions…

i think the below would be part of the syntax.

media_title: good morning
media_player.living_room

also i dont care about the last TTS being saved… and played if the button is pressed.

Thanks,
jay