Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleverio Sous Vide timer #67

Closed
develop-daraf opened this issue Jan 2, 2023 · 1 comment
Closed

Cleverio Sous Vide timer #67

develop-daraf opened this issue Jan 2, 2023 · 1 comment

Comments

@develop-daraf
Copy link

develop-daraf commented Jan 2, 2023

Thanks for sharing your card in HACS, which I used to get the timer status of my Cleverio Sous Vide. The Sous Vide is included in HA through the Tuya integration (https://www.home-assistant.io/integrations/tuya/).
Here is the settings I used if you want to include into your list:

entity: sensor.cleverio_sous_vide_status
type: custom:timer-bar-card
active_state: cooking
pause_state: standby
duration:
  entity: number.cleverio_sous_vide_cook_time
  units: minutes
remain_time:
  entity: sensor.cleverio_sous_vide_remaining_time
  units: minutes
# Below are just the modifications I used to make it look good in my frontend.
name: Timer
icon: mdi:timer-off
bar_height: 1.2em
bar_width: 45%
bar_direction: rtl
bar_radius: 1.2em
bar_foreground: green
text_width: 4em
invert: true
active_icon: mdi:timer
modifications:
  - elapsed: 75%
    bar_foreground: orange
  - elapsed: 90%
    bar_foreground: red

Caveats
When the timer bar is added to an Entities card it is not updated with the remaining time. I need to reload the page or edit the card to update the bar. It seems to be unaware of changes for the entity under the remain_time option.
I guess the bar only get update events from the entity in the first entity option, so I instead tried using the entities list option in a "standalone" time-bar-card. By including the sensor for the remaining time in this list I could get the timer bar to update properly, see example below:

type: custom:timer-bar-card
entities: 
  - sensor.cleverio_sous_vide_status
  - sensor.cleverio_sous_vide_remaining_time
# ... from here identical to the previous example

Another workaround is to use a template sensor for the state and add attributes for the duration and remaining time. Here is the template sensor configuration I used:

template:
  sensor:
    - name: Sous Vide timer
      unique_id: sous_vide_timer
      state: >
          {{ states('sensor.cleverio_sous_vide_status') }}
      attributes:
        duration: >
          {{ states('number.cleverio_sous_vide_cook_time') | int(0) }}
        remain_time: >
          {{ states('sensor.cleverio_sous_vide_remaining_time') | int(0) }}

The time-bar-card setup needs some changes in the duration and remain_time options:

duration:
  attribute: duration
  units: minutes
remain_time:
  attribute: remain_time
  units: minutes
@rianadon
Copy link
Owner

rianadon commented Jan 9, 2023

Thank you so much for the writeup, especially how you were able to create workarounds. However, everything under "Caveats" sounds like bugs with the card that should be fixed.

Would you mind installing the latest beta version to see if that fixes the issue?

Update: this should be fixed in v1.25.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants