Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 95919

Cant get an automaiotn to trigger on time!

$
0
0

@ins4neuk wrote:

I’m trying to set up an automation based on a time i can input in the UI and change when required.

i think i have everything set up correct but i cant get it to fire the animation at all

the following is in my config

sensor:
  - platform: time_date
    display_options:
      - 'time'
  
  
# Example configuration.yaml entry
input_datetime:
  only_time:
    name: Kitchen Lights On
    has_date: false
    has_time: true
  only_time2:
    name: Kitchen Lights Off
    has_date: false
    has_time: true

and the below is the automation, which when i trigger manually sends the alert to my phone

- id: '1576757804787'
  alias: test kitchen light automation
  description: test kitchen light automation
  trigger:
  - platform: template
    value_template: 'value_template: "{{ states(''sensor.time'') == (state_attr(''input_datetime.only_time2'', ''timestamp'') | int | timestamp_custom(''%H:%M'', False)) }}"'
  condition: []
  action:
  - data:
      message: test for timers at a set time
      title: test for lights on
    service: notify.notify

if i run the template code in the editor i get true or false returned depending on the time and the entered time accordingly

Any suggestions??

Posts: 5

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 95919

Trending Articles