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

It's all about time, which we have plenty of

$
0
0

@carltonb wrote:

Because I am now working from home I have created a time set up in lovelace which looks like this.
Screenshot from 2020-04-13 14-51-43

I have used the following to code as a sensor.

  - platform: worldclock
    name: New York
    time_zone: America/New_York
  - platform: worldclock
    name: Waukesha
    time_zone: America/Chicago
  - platform: worldclock
    name: Phoenix
    time_zone: America/Phoenix
  - platform: worldclock
    name: Los Angeles
    time_zone: America/Los_Angeles

and this is my lovelace

  - type: horizontal-stack
    title: Times
    cards:
      - type: glance
        entities:
          - sensor.new_york
          - sensor.waukesha
          - sensor.phoenix   
          - sensor.los_angeles

I have tried many methods on the forum to change these times to a 12 hr format in my template.
I can change them but they do not update, or my code changes all of them to the same time.
Here is a sample of what I have tried.

      simple_time_ny:
        friendly_name: 'New York Time'
        entity_id: sensor.new_york
        value_template: '{{ as_timestamp(now()) | timestamp_custom("%I:%M %p") }}'

Does any one have a solution to make all the times in three different time zones to go to a 12hr format and update.
Thanks,
carltonb

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 95437

Trending Articles



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