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

Need help for Input Datetime

$
0
0

@Dmitriy_As wrote:

My time is now 23:10
I want to perform automation on time

  1. In Configuration - Helpers - Add Helpers - Date and/or time - Create Time

  2. 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
  1. 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?

Posts: 8

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 95385

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>