My time is now 23:10
I want to perform automation on time
-
In Configuration - Helpers - Add Helpers - Date and/or time - Create Time
-
In automatios.yaml
- alias: Xiaomi OFF at clock
trigger:
- platform: template
value_template: "{{ states('sensor.time') == (state_attr('input_datetime.time', 'timestamp') | int | timestamp_custom('%H:%M', True)) }}"
action:
- entity_id: fan.xiaomi_miio_device
service: fan.turn_off
- In configuration.yaml
homeassistant:
time_zone: Asia/Yekaterinburg
sensor:
- platform: time_date
display_options:
- time
- date
time in sensor.time shows mine - 23:10 and input_datetime.time - 23:10
For Overview Creater new Card
cards:
- entities:
- entity: input_datetime.time
show_icon: true
show_name: true
show_state: true
theme: Backend-selected
title: Xiaomi
type: glance
type: horizontal-stack
It works, but the shutdown time doesnāt make it mine, but āMy timeā - 5 hours. = UTC
So In order for it to turn off at my time I need to set 18:10
how can I fix this? why is he taking time out of my zone?