Sensor worldClock disappears

Hello All,

Realize I may be doing something wrong. I am trying to show the date and time of my zone as well as India to Lovelace.

Situation: Whichever entry under “sensor” is second disappears. Hence if I add “WorldClock” first then “time_date” second then “WorldClock” disappears from my entities list.

Thanks in advance

sensor:
    platform: worldclock
    time_zone: Asia/Calcutta
    
Sensor:    
    platform: time_date
    display_options:
      - 'time'
      - 'date'
      - 'date_time'
      - 'time_date'

You can only have sensor: once in your configuration.yaml. Remove the second one.

sensor:
  - platform: worldclock
    time_zone: Asia/Calcutta
    
  - platform: time_date
    display_options:
      - 'time'
      - 'date'
      - 'date_time'
      - 'time_date'

Thanks Francis. Is there anyway to show time from another zone can there be two time_zone

  - platform: worldclock
    time_zone: Asia/Calcutta
    time_zone: America/New_York

or maybe UTC + time

I don’t think so. Just create 2 sensors

  - platform: worldclock
    time_zone: Asia/Calcutta
    name: calcutta

  - platform: worldclock
    time_zone: America/New_York
    name: new_york

1 Like

Thanks Francis – unfortunately only one sensor is created – the second one. I have reverted back to time_date as that sensor also gives me the date.

sensor:
    platform: worldclock
    time_zone: Asia/Calcutta
    name: India
    
    platform: worldclock
    time_zone: America/New_York
    name: Canada

See the dashes in Francis’ response?
They are significant… A dash means another entry in a list (of sensors, here)

Thanks Chris. That worked. In case anyone needs to add a clock to HA this is a great way to do so World Clock HA Card