StyraHem / ShellyForHASS

Shelly smart home platform for Home Assistant
MIT License
616 stars 111 forks source link

[BUG] Shelly 2.5 trigger overtemp warning in ShellyForHASS, even they aren't too hot. #721

Open SciLor opened 1 year ago

SciLor commented 1 year ago

Environment

Describe the bug

Shelly 2.5 randomly triggers an overtemp warning, even they are not in over temp (mqtt shows no entries with an overtemp warning)

Steps to Reproduce

Enable the overtemp sensor option in the config of sfh (don't know if it occurs as attribute)

Add following template sensors to your config:

template:
  - sensor:
      - unique_id: overpower_alarms_count
        name: Overpower alarms count
        state: >
          {{ states.binary_sensor
             |selectattr("entity_id", "search", "(_over_power)")
             |selectattr('state','eq', 'on')
             |list|count }}
      - unique_id: overtemp_alarms_count
        name: Overtemp alarms count
        state: >
          {{ states.binary_sensor
             |selectattr("entity_id", "search", "(_over_temp)")
             |selectattr('state','eq', 'on')
             |list|count }}
      - unique_id: overvoltage_alarms_count
        name: Overvoltage alarms count
        state: >
          {{ states.binary_sensor
             |selectattr("entity_id", "search", "(_over_voltage)")
             |selectattr('state','eq', 'on')
             |list|count }}

You may open the Dev-Tools - Template section and add the following template: {{ states.binary_sensor |selectattr("entity_id", "search", "(_over_power|_over_temp|_over_voltage)") |selectattr('state','eq', 'on') |list|join(', ') }}

Expected behavior

Don't trigger the overtemp warning, when there is no overtemperature

Screenshots

Traceback/Error logs

Let me know how the generate specific logs for the problem, I may generate them for you

Additional context

The other Shellies (Shelly Plus) I have don't produce overtemp warning randomly. So it should be a problem specific to the older shellies or even to the 2.5.