Working with timer entities

Hi,
i’ve created some timers on my irrigations valve.

I don’t know why, but it seems the timers doesn’t work as it should.
When triggered, timer entity change its status in Active but remaining attribute doesn’t start count-down.

Thanks in advance for any help.
Regards,

Alessandro

Cattura
Cattura1

You will not see the remaining attribute change in the Developer Tools/STATES ui. But the timer is running and if you display the timer in your HA ui you will see it counting down.

Hmhmhmh…i don’t think so.
Here is my custom card:

aspect_ratio: 50%
elements:
  - entity: sensor.giardino_fronte_linea1_time_left
    style:
      bottom: 0
      color: white
      font-size: 16px
      line-height: 32px
      padding: 0px 44px
      pointer-events: none
      right: 0
      transform: initial
    type: state-label
  - entity: sensor.irrigazione_fronte_status
    icon: 'mdi:progress-clock'
    style:
      bottom: 0
      color: white
      line-height: 32px
      padding: 8px 16px
      right: 0
      transform: initial
    type: icon
  - entity: input_select.irrigazione_fronte_status
    prefix: 'Stato: '
    style:
      color: 'rgba(255,255,255,0.8)'
      font-size: 16px
      font-weight: bold
      left: '-4%'
      line-height: 32px
      padding: 8px 35px
      pointer-events: none
      top: 75%
      transform: initial
    type: state-label
image: /local/images/irrigazione_fronte.png
type: picture-elements

Cattura.PNG

As you can see, timer remained at 00:20:00.

Thanks again,

Alessandro

You need to display the remaining attribute. The state just says active. You will see it if you are able to open the more-info dialog for example but displaying the remaining attribute will also show it.

What does your sensor.giardino_fronte_linea1_time_left definition look like. It’s also possible that there is nothing telling the screen to update.

Here is what I have for timers. They’re being triggered by motion via node-red. Don’t recall having to do anything extra.

config.yaml

timer:
  lrlight:
    duration: '00:30:00'
  garage:
    duration: '00:15:00'

Then in lovelace i’m just adding the below to the card.

timer.lrlight
timer.garage

2020-04-21_16-17-52

The bit of the automation starting the timer.
2020-04-21_16-28-59

Here it is:

I don’t think this will work because even though the attribute ‘remaining’ is changing the state of the ‘timer’ (active) is not and therefore the xxxx_time_left template sensor you constructed will not update. To see that the timer is actually working go to Developer Tools/STATES and click on the circle-i icon next to the timer entity. A more-info box will open showing the remaining time counting down. To get this to work like you want will likely require custom coding.

You will likely get only two updates. Once at the start and once at the end as the timer transitions between idle and active states. Also if you pause it you will likely see an update too.