KartoffelToby / better-thermostat-ui-card

a custom card for a better thermostat in home assistant based on better_thermostat intigration
https://better-thermostat.org
205 stars 79 forks source link

[bug] 0.20 - bring display of window sensor status back #39

Closed bsafh closed 1 year ago

bsafh commented 1 year ago

With 0.2.0, the window sensors status is no longer displayed.

Please bring it back, as a configurable option preferably

KartoffelToby commented 1 year ago

it should show as an icon

3

bsafh commented 1 year ago

unfortunately not:

image

type: grid
square: false
columns: 1
cards:
  - type: custom:better-thermostat-ui-card
    entity: climate.trv_ai_bad_gaeste_2
  - type: custom:better-thermostat-ui-card
    entity: climate.trv_ai_buero_cb_2
  - type: custom:better-thermostat-ui-card
    entity: climate.trv_ai_bad_unten
  - type: custom:better-thermostat-ui-card
    entity: climate.trv_ai_bad_oben
  - type: custom:better-thermostat-ui-card
    entity: climate.trv_ai_buero_dunja
  - type: custom:better-thermostat-ui-card
    entity: climate.trv_ai_diele
  - type: custom:better-thermostat-ui-card
    entity: climate.trv_ai_flur_oben
  - type: custom:better-thermostat-ui-card
    entity: climate.trv_ai_schlafzimmer
  - type: custom:better-thermostat-ui-card
    entity: climate.trv_ai_schlafzimmer_1
  - type: custom:better-thermostat-ui-card
    entity: climate.trv_ai_schlafzimmer_2
  - type: custom:better-thermostat-ui-card
    entity: climate.trv_ai_schlafzimmer_hm_gruppe
  - type: custom:better-thermostat-ui-card
    entity: climate.trv_ai_wc_oben
  - type: custom:better-thermostat-ui-card
    entity: climate.trv_ai_wohnzimmer
  - type: custom:better-thermostat-ui-card
    entity: climate.trv_ai_wohnzimmer_1
  - type: custom:better-thermostat-ui-card
    entity: climate.trv_ai_wohnzimmer_2
  - type: custom:better-thermostat-ui-card
    entity: climate.trv_ai_wohnzimmer_hm_gruppe
  - type: custom:better-thermostat-ui-card
    entity: climate.trv_ai_zimmer_lena
  - type: custom:better-thermostat-ui-card
    entity: climate.trv_ai_zimmer_svenja

from /conf/.storage/config_entries

      {
        "entry_id": "801f4224098708ea9da62293432571cd",
        "version": 1,
        "domain": "better_thermostat",
        "title": "TRV_AI_Zimmer_Lena",
        "data": {
          "name": "TRV_AI_Zimmer_Lena",
          "thermostat": "climate.hm_cc_rt_dn_neq0313577",
          "local_calibration": null,
          "temperature_sensor": "sensor.temp_hum_lena_temperature",
          "outdoor_sensor": "sensor.temp_hum_terasse_2_temperature",
          "window_sensors": "binary_sensor.fenster_zimmer_lena",
          "weather": "weather.openweathermap",
          "window_off_delay": 15,
          "off_temperature": 17,
          "calibration_round": false,
          "valve_maintenance": false,
          "heat_auto_swapped": false,
          "child_lock": false,
          "model": "generic"
        },
        "options": {},
        "pref_disable_new_entities": false,
        "pref_disable_polling": false,
        "source": "user",
        "unique_id": "92a73395-202a-484e-9643-ff5ce0ac7462",
        "disabled_by": null
      },

the sensor does exist (from developer tools in HA):

device_class: opening
friendly_name: Fenster_Zimmer_Lena
entity_id:
  - binary_sensor.fenster_tur_12_ias_zone
  - binary_sensor.fenster_tur_13_ias_zone
binary_sensor.fenster_zimmer_lena
Fenster_Zimmer_Lena
state: off  
device_class: opening
friendly_name: Fenster_Zimmer_Lena
entity_id: binary_sensor.fenster_tur_12_ias_zone, binary_sensor.fenster_tur_13_ias_zone

none of my 16 better_thermostat entities does show the windows_sensors state.

Only two of them (both based on tjhe TRV mode HM-CC-VG-1) look like this

image

(the better_thermostat units based on HM-CC-RT-DN (which have the same set of entities in HA) do not show these symbols)

KartoffelToby commented 1 year ago

Can you Share the states from the not working one. And the BT Diagnose file

bsafh commented 1 year ago
binary_sensor.fenster_zimmer_lena
Fenster_Zimmer_Lena
**state: off**  
device_class: opening
friendly_name: Fenster_Zimmer_Lena
entity_id: binary_sensor.fenster_tur_12_ias_zone

During that Test all states of all window sensors in all of the house were state=off (closed).

I can't share the BT diagnose file because I always get a file download error when I try downloading... Sorry.

KartoffelToby commented 1 year ago

@bsafh ok the Download Error suggest Something is wrong with the Window Sensor entity, pls check the logs (debug mode for BT enabled)

KartoffelToby commented 1 year ago

You can also try to readd the TRV, make sure you run the latest Beta

bsafh commented 1 year ago

suggest Something is wrong with the Window Sensor entity

sorry, but it it highly unlikely that all 20 of my window sensors suddenly have a problem (which doesn't show up anywhere else), because this error occurs for all BT TRV devices ...

latest Beta

it's 1.0.0-beta19

try to readd the TRV

fine, I'll do that.

Will take a bit of time, there are 16 TRV, and there are 5 sensors to select from a long list for each of them ...

so stay tuned, may take a while

bsafh commented 1 year ago

You can also try to readd the TRV, make sure you run the latest Beta

done

re-added all BT TRV

1.0.0.-beta19 card 0.2.0

no window indication shown

log level debug:

logger:
  # The next line sets the default logging level, for all python modules.
  # It seems "recommended" to set it to avoid too much logging.
  default: warning
  logs:
    custom_components.zha_toolkit: warn
    pyhomematic: info
    homeassistant.components.homematic: info
    custom_component.better_thermostat: debug

no entries in log

(I had accidentially configeutred a bad sensor - that resulted in an error in the log, but the correct existing windows_senors do not give any error. On none of the 16 BT TRV)

image

Vollständige Protokolle
2022-09-18 09:52:10.075 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration better_thermostat which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-09-18 12:12:34.031 WARNING (MainThread) [homeassistant.components.automation.dunja_da_setzen_phone_wenn_dunja_cb_home_betritt_duplizieren] "Dunja da" setzen (Phone) wenn Dunja "CB Home" betritt: Already running
2022-09-18 12:12:34.039 WARNING (MainThread) [homeassistant.components.automation.heating_heizung_an_phone_wenn_dunja_uetze_betritt_duplizieren] HEATING: Heizung an (Phone) wenn Dunja "Uetze" betritt (Duplizieren): Already running
2022-09-18 12:12:34.040 WARNING (MainThread) [homeassistant.components.automation.heating_heizung_an_phone_wenn_dunja_uetze_betritt_duplizieren] HEATING: Heizung an (Phone) wenn Dunja "Uetze" betritt (Duplizieren): Already running
2022-09-18 12:33:01.775 ERROR (MainThread) [custom_components.better_thermostat.events.window] better_thermostat TRV_AI_Buero_Dunja: New window sensor state '20.9' not recognized
2022-09-18 13:16:57.423 ERROR (MainThread) [custom_components.better_thermostat.events.window] better_thermostat TRV_AI_Buero_Dunja: New window sensor state '21.1' not recognized
2022-09-18 13:46:57.079 ERROR (MainThread) [custom_components.better_thermostat.events.window] better_thermostat TRV_AI_Buero_Dunja: New window sensor state '21.0' not recognized

that was the wrong sensor.

I deleted and re-added that BT TRV with the correct window sensor and - nor errorrs any more

2022-09-18 13:52:34.002 WARNING (MainThread) [custom_components.better_thermostat.weather] better_thermostat TRV_AI_Flur_oben: no weather entity data found.
2022-09-18 13:52:34.009 WARNING (MainThread) [custom_components.better_thermostat.weather] better_thermostat TRV_AI_Flur_oben: no weather entity data found.
2022-09-18 13:53:15.947 WARNING (MainThread) [custom_components.better_thermostat.weather] better_thermostat TRV_AI_Wohnzimmer_HM-Gruppe: no weather entity data found.
2022-09-18 13:53:15.950 WARNING (MainThread) [custom_components.better_thermostat.weather] better_thermostat TRV_AI_Wohnzimmer_HM-Gruppe: no weather entity data found.
2022-09-18 13:53:33.515 WARNING (MainThread) [custom_components.better_thermostat.weather] better_thermostat TRV_AI_Bad_Gaeste: no weather entity data found.
2022-09-18 13:53:59.030 WARNING (MainThread) [custom_components.better_thermostat.weather] better_thermostat TRV_AI_Bad_Gaeste: no weather entity data found.
2022-09-18 13:54:15.751 WARNING (MainThread) [custom_components.better_thermostat.weather] better_thermostat TRV_AI_WC_oben: no weather entity data found.
2022-09-18 13:54:15.775 WARNING (MainThread) [custom_components.better_thermostat.weather] better_thermostat TRV_AI_WC_oben: no weather entity data found.
2022-09-18 13:54:42.370 WARNING (MainThread) [custom_components.better_thermostat.weather] better_thermostat TRV_AI_Schlafzimmer_2: no weather entity data found.

well, there was a temporary DSL outage - after the Internet connection came back, the errors stopped.

image

config_entry-better_thermostat-829154d23806bd317b612ac8c363e518.json.txt

config_entry-better_thermostat-a8146b572ca54b83c2bd4914882757e6.json.txt

the sensors in the screenshot above is:

image

that's template sensor:


  - binary_sensor:
      - name: Fenster_Sensor_Gruppe_Schlafzimmer
        unique_id: 'e2cc54bc-393c-412d-a632-99e9cf4d19ac'
        state: >
          {{ is_state('binary_sensor.fenster_tur_5_ias_zone', 'on')
             or is_state('binary_sensor.fenster_tur_6_ias_zone', 'on')
             or is_state('binary_sensor.fenster_tur_9_ias_zone', 'on')
            }}
        device_class: window

the three sensors within that are

image image image

so - there is nothing wrong with those sensors, but the UI card still does not show any symbols

the second one is actually a climate_group entity:

hvac_modes:
  - heat
  - 'off'
min_temp: 4.5
max_temp: 30.5
current_temperature: 20.9
temperature: 11.5
hvac_action: heating
entity_id:
  - climate.trv_ai_schlafzimmer_1
  - climate.trv_ai_schlafzimmer_2
friendly_name: TRV_AI_Schlafzimmer
supported_features: 1

so that's OK not to show a window symbol, as there is none for a group

"window_sensors": "binary_sensor.fenster_sensor_gruppe_flur_kueche_oben",

image

  - binary_sensor:
      - name: Fenster_Sensor_Gruppe_Flur_Kueche_oben
        unique_id: '385e868f-74d5-4943-853e-da4cff85f36e'
        state: >
          {{ is_state('binary_sensor.fenster_tur_16_flur_oben_iaszone', 'on')
             or is_state('binary_sensor.fenster_tur_kuche_oben_iaszone', 'on')
            }}
        device_class: window          

image image

so - there is definitely nothing wrong with the sensors

bsafh commented 1 year ago

there was a typo in the logger definition...

this is the debug log from right now after a restart of HA

better_thermostat.debug.log.txt

KartoffelToby commented 1 year ago

@bsafh see the other issue in bt, its related, what was the typo?

btw, you can take a look into the status in the developer tools, of the bt entity, there is an attribute called window_open, the ui just looking for this boolean, looks like in the main intigration is something wrong

bsafh commented 1 year ago

what was the typo?

my typo, not yours ;)

it has to be custom_components.better_thermostat: debug, not custom_component.better_thermostat: debug

it works beter if you type it correctly ;)

sorry for the confusion

you're talking about this? I can't see a window_open state? But that's OK, that's just badly named by me: it's the climate group combined from the two BTs in that room.

TRV_AI_Schlafzimmer
hvac_modes:
  - heat
  - 'off'
min_temp: 4.5
max_temp: 30.5
current_temperature: 20.5
temperature: 17
hvac_action: heating
entity_id:
  - climate.trv_ai_schlafzimmer_1
  - climate.trv_ai_schlafzimmer_2
friendly_name: TRV_AI_Schlafzimmer
supported_features: 1

but I do see it here and on all of the BT devices: BTW: the target temp step is still 1, not 0.5 .....

TRV_AI_Flur_oben
hvac_modes:
  - heat
  - 'off'
min_temp: 4.5
max_temp: 30.5
target_temp_step: 1
current_temperature: 21.3
temperature: 17
hvac_action: heating
window_open: false
call_for_heat: true
last_change: null
child_lock: false
friendly_name: TRV_AI_Flur_oben
supported_features: 1
KartoffelToby commented 1 year ago

Ah yes, the climate group doesn't pipe this values.

The climate group Intigration isn't compatiple with the ui.

You can reach out to the maintainer of climate group to Pipe Attributes as well.

But i plan a own group function in the future

bsafh commented 1 year ago

You can reach out to the maintainer of climate group to Pipe Attributes as well.

yes, I know - but that is not the point here ;)

all the BT-UI cards of the BT thermostats do NOT show the symbols either, that is the point, see TRV-AI_flur_oben in the postings above.

This is NOT a group, it is a BT entity.

image

that's with Beta-20 and HA 2022.9.5

KartoffelToby commented 1 year ago

As i'm right the last versions working for you?

KartoffelToby commented 1 year ago

we have icons with labels now