Barma-lej / landroid-card

Landroid mower card for Home Assistant Lovelace UI
MIT License
101 stars 55 forks source link

blade running time misrepresented #341

Closed Cosmicbase closed 1 week ago

Cosmicbase commented 6 months ago

Describe the bug

Blade runtime is displayed incorrectly instead of factor 1 is divided by 1000 in the YAML

Steps to change and solve the problem

Change divided 1000 to factor 1

Versions:

IMG_1075 IMG_1074

Barma-lej commented 6 months ago

I use:

    - entity_id: sensor.mower_blades_total_on_time
      subtitle: Total blade time
      value_template: '{{ as_timedelta((value | float(0) * 3600) | string) }}'
    - entity_id: sensor.mower_blades_current_on_time
      subtitle: Current blade time
      value_template: '{{ as_timedelta((value | float(0) * 3600) | string) }}'
    - entity_id: sensor.mower_total_worktime
      subtitle: Work time
      value_template: '{{ as_timedelta((value | float(0) * 3600) | string ) }}'
    - entity_id: sensor.mower_distance_driven
      value_template: '{{ (value | float(0) / 1000) | round(3) }}'
      unit: km
      subtitle: Distance
Cosmicbase commented 6 months ago

value_template: '{{ as_timedelta((value | float(0) * 3600) | string) }}'

Multiplier 3600 is too much. I get the wrong value. If I only use 1, i.e. don't multiply, the result is perfect.

For the other calculations I used /1000 instead of * 3600. All values ​​match the app.

IMG_1082 IMG_1081

Barma-lej commented 6 months ago

Try it. It's cool. Just try )