rianadon / timer-bar-card

A progress bar display for Home Assistant timers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Multiple sliders start together even if they have different entities

tehnic1service opened this issue · comments

image

I have 2 cards, each having diferent entity, but when I start one, both timers start. This is only a visual problem, because only the entity I trigger is actually switched.

First card configuration:

type: custom:timer-bar-card
entity: switch.sprinklere_gazon_spate
name: Gazon spate
duration:
  fixed: '00:15:00'
invert: true
bar_direction: rtl
bar_width: 60%
mushroom:
  layout: horizontal
  color: green
hold_action:
  action: toggle

Second card configuration:

type: custom:timer-bar-card
entity: switch.sprinklere_gazon_fata
name: Gazon fata
duration:
  fixed: '00:15:00'
invert: true
bar_direction: rtl
bar_width: 60%
mushroom:
  layout: horizontal
  color: green
hold_action:
  action: toggle

Debug information

GIVEN I start the first timer
THEN both timers countdown start:

image

GIVEN I start the first timer
WHEN I stop the first timer
THEN both timers stop:

image

GIVEN I start the first timer
WHEN I stop the second timer
THEN the first timer continue running:

image

I'm not sure if I'm doing it right because I just started with Home Assistant and custom cards. If I can send additional data, please let me know.
Thank you!

Hi! Welcome to Home Assistant ✨. There really is a lot to learn. And thank you for all the screenshots. This is super helpful.

The State field shown in the debugging panel is taken directly from Home Assistant, so it almost appears as if whatever integration is connecting these switches is reporting the incorrect state.

Would you mind trying to turn on/off the switches using the built-in Home Assistant controls in the same set of sequences you posted above to see if they behave differently?

I did some more tests, and you are right. The entity I call, is a group of 3 entities: The pump, the power supply of the valves and the specific valve. So both timers have the pump and the power supply in the group. This is why both look active when I trigger one of them.

I made another timer with only the sprinkler valve and it worked as expected. Only that timer starts when I trigger it.
image

Probably I'll add an automation, to trigger the pump and the power supply when a sprinkler valve is triggered.

Thank you for your help and for the great timer you made! 🍺

P.S.

I found an easier solution. At group level we can specify that the state of the group change only if all the entities have the same state:

image

Maybe this can help someone else.