Blackymas / NSPanel_HA_Blueprint

This allows you to configure your complete NSPanel via Blueprint with UI and without changing anything in the code
1.43k stars 259 forks source link

`BUG` Sensor 01 - ENTITY (Optional)" missing from the main page due to climate issue #1655

Closed feinadam closed 9 months ago

feinadam commented 9 months ago

TFT Version

4.2.2

ESPHome Version

2023.12.06

Blueprint Version

4.2.2

Panel Model

NSPanel EU Model

What is the bug?

Sensor 01 - ENTITY (Optional)" missing from the main page due to climate issue

Steps to Reproduce

"Sensor 01 - ENTITY (Optional)" missing from the main page. I have tried to display several entity on Sensor 01 but none of them was displayed. I have identified the issue above is due to the "Climate to control - ENTITY (Optional)". The climate page seems not wokring, buttons are not loading etc. When I have removed the climate entity, the Sensor 01 - ENTITY appears on the main screen.

Unfortunately I have uploaded together the 4.2.2 and the idf lib transition. Therefore I don't know wich one is cousing the problem.

Your panel's YAML

No response

ESPHome logs

INFO ESPHome 2023.12.6
INFO Reading configuration /config/esphome/kijelzo.yaml...
INFO Updating https://github.com/Blackymas/NSPanel_HA_Blueprint@main
INFO Updating https://github.com/esphome/esphome.git@pull/6051/head
INFO Detected timezone 'Europe/Budapest'
INFO Starting log output from 192.168.1.188 using esphome API
INFO Successfully connected to kijelzo @ 192.168.1.188 in 0.013s
INFO Successful handshake with kijelzo @ 192.168.1.188 in 0.045s
[19:11:46][I][app:102]: ESPHome version 2023.12.6 compiled on Jan 16 2024, 15:24:46
[19:11:46][C][wifi:573]: WiFi:
[19:11:46][C][wifi:405]:   Local MAC: 44:17:93:7B:CF:B8
[19:11:46][C][wifi:410]:   SSID: 'LepnyakLAN_Garden'[redacted]
[19:11:46][C][wifi:411]:   IP Address: 192.168.1.188
[19:11:46][C][wifi:413]:   BSSID: B0:95:75:23:CD:54[redacted]
[19:11:46][C][wifi:414]:   Hostname: 'kijelzo'
[19:11:46][C][wifi:416]:   Signal strength: -43 dB ▂▄▆█
[19:11:46][C][wifi:420]:   Channel: 13
[19:11:46][C][wifi:421]:   Subnet: 255.255.255.0
[19:11:46][C][wifi:422]:   Gateway: 192.168.1.1
[19:11:46][C][wifi:423]:   DNS1: 192.168.1.1
[19:11:46][C][wifi:424]:   DNS2: 192.168.1.1
[19:11:46][C][logger:439]: Logger:
[19:11:46][C][logger:440]:   Level: DEBUG
[19:11:46][C][logger:441]:   Log Baud Rate: 0
[19:11:46][C][logger:443]:   Hardware UART: UART0
[19:11:46][C][uart.idf:139]: UART Bus 0:
[19:11:46][C][uart.idf:140]:   TX Pin: GPIO16
[19:11:46][C][uart.idf:141]:   RX Pin: GPIO17
[19:11:46][C][uart.idf:143]:   RX Buffer Size: 256
[19:11:46][C][uart.idf:145]:   Baud Rate: 115200 baud
[19:11:46][C][uart.idf:146]:   Data Bits: 8
[19:11:46][C][uart.idf:147]:   Parity: NONE
[19:11:46][C][uart.idf:148]:   Stop bits: 1
[19:11:46][C][ledc.output:164]: LEDC Output:
[19:11:46][C][ledc.output:165]:   Pin GPIO21
[19:11:46][C][ledc.output:166]:   LEDC Channel: 0
[19:11:46][C][ledc.output:167]:   PWM Frequency: 1319.0 Hz
[19:11:46][C][ledc.output:168]:   Bit depth: 15
[19:11:46][C][template.binary_sensor:028]: Template Binary Sensor 'kijelzo Nextion display'
[19:11:46][C][template.binary_sensor:028]:   Device Class: 'connectivity'
[19:11:46][C][template.number:050]: Template Number 'kijelzo Display Brightness'
[19:11:46][C][template.number:050]:   Unit of Measurement: '%'
[19:11:46][C][template.number:051]:   Optimistic: YES
[19:11:46][C][template.number:052]:   Update Interval: 60.0s
[19:11:46][C][template.number:050]: Template Number 'kijelzo Display Brightness Dimdown'
[19:11:46][C][template.number:050]:   Unit of Measurement: '%'
[19:11:46][C][template.number:051]:   Optimistic: YES
[19:11:46][C][template.number:052]:   Update Interval: 60.0s
[19:11:46][C][template.number:050]: Template Number 'kijelzo Display Brightness Sleep'
[19:11:46][C][template.number:050]:   Unit of Measurement: '%'
[19:11:46][C][template.number:051]:   Optimistic: YES
[19:11:46][C][template.number:052]:   Update Interval: 60.0s
[19:11:46][C][template.number:050]: Template Number 'kijelzo Temperature Correction'
[19:11:46][C][template.number:050]:   Unit of Measurement: '°C'
[19:11:46][C][template.number:051]:   Optimistic: YES
[19:11:46][C][template.number:052]:   Update Interval: 60.0s
[19:11:46][C][template.number:050]: Template Number 'kijelzo Timeout Page'
[19:11:46][C][template.number:050]:   Icon: 'mdi:timer'
[19:11:46][C][template.number:050]:   Unit of Measurement: 's'
[19:11:46][C][template.number:051]:   Optimistic: YES
[19:11:46][C][template.number:052]:   Update Interval: 60.0s
[19:11:46][C][template.number:050]: Template Number 'kijelzo Timeout Dimming'
[19:11:46][C][template.number:050]:   Icon: 'mdi:timer'
[19:11:46][C][template.number:050]:   Unit of Measurement: 's'
[19:11:46][C][template.number:051]:   Optimistic: YES
[19:11:46][C][template.number:052]:   Update Interval: 60.0s
[19:11:46][C][template.number:050]: Template Number 'kijelzo Timeout Sleep'
[19:11:46][C][template.number:050]:   Icon: 'mdi:timer'
[19:11:46][C][template.number:050]:   Unit of Measurement: 's'
[19:11:46][C][template.number:051]:   Optimistic: YES
[19:11:46][C][template.number:052]:   Update Interval: 60.0s
[19:11:46][C][template.select:065]: Template Select 'kijelzo Baud rate'
[19:11:46][C][template.select:065]:   Icon: 'mdi:swap-horizontal'
[19:11:46][C][template.select:066]:   Update Interval: 60.0s
[19:11:46][C][template.select:069]:   Optimistic: YES
[19:11:46][C][template.select:070]:   Initial Option: 115200
[19:11:46][C][template.select:071]:   Restore Value: YES
[19:11:46][C][template.select:065]: Template Select 'kijelzo Wake-up page'
[19:11:46][C][template.select:065]:   Icon: 'mdi:page-next-outline'
[19:11:46][C][template.select:066]:   Update Interval: 60.0s
[19:11:46][C][template.select:069]:   Optimistic: YES
[19:11:46][C][template.select:070]:   Initial Option: home
[19:11:46][C][template.select:071]:   Restore Value: YES
[19:11:46][C][template.select:065]: Template Select 'kijelzo Update TFT display - Branch'
[19:11:46][C][template.select:065]:   Icon: 'mdi:file-sync'
[19:11:46][C][template.select:066]:   Update Interval: 60.0s
[19:11:46][C][template.select:069]:   Optimistic: YES
[19:11:46][C][template.select:070]:   Initial Option: main
[19:11:46][C][template.select:071]:   Restore Value: YES
[19:11:46][C][template.select:065]: Template Select 'kijelzo Update TFT display - Model'
[19:11:46][C][template.select:065]:   Icon: 'mdi:file-sync'
[19:11:46][C][template.select:066]:   Update Interval: 60.0s
[19:11:46][C][template.select:069]:   Optimistic: YES
[19:11:46][C][template.select:070]:   Initial Option: Use nextion_update_url
[19:11:46][C][template.select:071]:   Restore Value: YES
[19:11:46][C][template.text_sensor:020]: Template Sensor 'kijelzo Detailed Entity'
[19:11:46][C][template.text_sensor:020]:   Icon: 'mdi:tablet-dashboard'
[19:11:46][C][template.text_sensor:020]: Template Sensor 'kijelzo Current page'
[19:11:46][C][template.text_sensor:020]:   Icon: 'mdi:tablet-dashboard'
[19:11:46][C][template.text_sensor:020]: Template Sensor 'kijelzo Notification Label'
[19:11:46][C][template.text_sensor:020]: Template Sensor 'kijelzo Notification Text'
[19:11:46][C][switch.gpio:068]: GPIO Switch 'kijelzo Relay 1'
[19:11:46][C][switch.gpio:091]:   Restore Mode: restore defaults to OFF
[19:11:46][C][switch.gpio:031]:   Pin: GPIO22
[19:11:46][C][switch.gpio:068]: GPIO Switch 'kijelzo Relay 2'
[19:11:46][C][switch.gpio:091]:   Restore Mode: restore defaults to OFF
[19:11:46][C][switch.gpio:031]:   Pin: GPIO19
[19:11:47][C][gpio.binary_sensor:015]: GPIO Binary Sensor 'kijelzo Left Button'
[19:11:47][C][gpio.binary_sensor:016]:   Pin: GPIO14
[19:11:47][C][gpio.binary_sensor:015]: GPIO Binary Sensor 'kijelzo Right Button'
[19:11:47][C][gpio.binary_sensor:016]:   Pin: GPIO27
[19:11:47][C][switch.gpio:068]: GPIO Switch 'kijelzo Nextion display - Power'
[19:11:47][C][switch.gpio:091]:   Restore Mode: always ON
[19:11:47][C][switch.gpio:031]:   Pin: GPIO4
[19:11:47][C][template.switch:068]: Template Switch 'kijelzo Notification sound'
[19:11:47][C][template.switch:091]:   Restore Mode: restore defaults to OFF
[19:11:47][C][template.switch:057]:   Optimistic: YES
[19:11:47][C][template.switch:068]: Template Switch 'kijelzo Relay 1 Local'
[19:11:47][C][template.switch:091]:   Restore Mode: restore defaults to OFF
[19:11:47][C][template.switch:057]:   Optimistic: YES
[19:11:47][C][template.switch:068]: Template Switch 'kijelzo Relay 2 Local'
[19:11:47][C][template.switch:091]:   Restore Mode: restore defaults to OFF
[19:11:47][C][template.switch:057]:   Optimistic: YES
[19:11:47][C][template.switch:068]: Template Switch 'kijelzo Notification unread'
[19:11:47][C][template.switch:091]:   Restore Mode: always OFF
[19:11:47][C][template.switch:057]:   Optimistic: YES
[19:11:47][C][rtttl:029]: Rtttl
[19:11:47][C][nextion:128]: Nextion:
[19:11:47][C][nextion:129]:   Device Model:     NX4832F035_011C
[19:11:47][C][nextion:130]:   Firmware Version: 72
[19:11:47][C][nextion:131]:   Serial Number:    1066340125E9D678
[19:11:47][C][nextion:132]:   Flash Size:       16777216
[19:11:47][C][nextion:133]:   Wake On Touch:    YES
[19:11:47][C][nextion:134]:   Exit reparse:     YES
[19:11:47][C][restart.button:017]: Restart Button 'kijelzo Restart'
[19:11:47][C][adc:097]: ADC Sensor 'ntc_source'
[19:11:47][C][adc:097]:   Device Class: 'voltage'
[19:11:47][C][adc:097]:   State Class: 'measurement'
[19:11:47][C][adc:097]:   Unit of Measurement: 'V'
[19:11:47][C][adc:097]:   Accuracy Decimals: 2
[19:11:47][C][adc:107]:   Pin: GPIO38
[19:11:47][C][adc:122]:  Attenuation: 11db
[19:11:47][C][adc:142]:   Update Interval: 60.0s
[19:11:47][C][resistance:010]: Resistance Sensor 'resistance_sensor'
[19:11:47][C][resistance:010]:   State Class: 'measurement'
[19:11:47][C][resistance:010]:   Unit of Measurement: 'Ω'
[19:11:47][C][resistance:010]:   Accuracy Decimals: 1
[19:11:47][C][resistance:010]:   Icon: 'mdi:flash'
[19:11:47][C][resistance:011]:   Configuration: DOWNSTREAM
[19:11:47][C][resistance:012]:   Resistor: 11200.00Ω
[19:11:47][C][resistance:013]:   Reference Voltage: 3.3V
[19:11:47][C][ntc:014]: NTC Sensor 'kijelzo Temperature'
[19:11:47][C][ntc:014]:   Device Class: 'temperature'
[19:11:47][C][ntc:014]:   State Class: 'measurement'
[19:11:47][C][ntc:014]:   Unit of Measurement: '°C'
[19:11:47][C][ntc:014]:   Accuracy Decimals: 1
[19:11:47][C][homeassistant.time:010]: Home Assistant Time:
[19:11:47][C][homeassistant.time:011]:   Timezone: 'CET-1CEST,M3.5.0,M10.5.0/3'
[19:11:47][C][status:034]: Status Binary Sensor 'kijelzo Status'
[19:11:47][C][status:034]:   Device Class: 'connectivity'
[19:11:48][C][mdns:115]: mDNS:
[19:11:48][C][mdns:116]:   Hostname: kijelzo
[19:11:48][C][ota:097]: Over-The-Air Updates:
[19:11:48][C][ota:098]:   Address: kijelzo.local:3232
[19:11:48][C][ota:101]:   Using Password.
[19:11:48][C][api:139]: API Server:
[19:11:48][C][api:140]:   Address: kijelzo.local:6053
[19:11:48][C][api:144]:   Using noise encryption: NO
[19:11:48][C][wifi_signal.sensor:009]: WiFi Signal 'kijelzo RSSI'
[19:11:48][C][wifi_signal.sensor:009]:   Device Class: 'signal_strength'
[19:11:48][C][wifi_signal.sensor:009]:   State Class: 'measurement'
[19:11:48][C][wifi_signal.sensor:009]:   Unit of Measurement: 'dBm'
[19:11:48][C][wifi_signal.sensor:009]:   Accuracy Decimals: 0
[19:11:52][D][script:077]: Script 'timer_sleep' restarting (mode: restart)
[19:11:52][D][script:077]: Script 'timer_dim' restarting (mode: restart)
[19:11:54][D][script:077]: Script 'timer_sleep' restarting (mode: restart)
[19:11:54][D][script:077]: Script 'timer_dim' restarting (mode: restart)
[19:11:56][D][script:077]: Script 'timer_sleep' restarting (mode: restart)
[19:11:56][D][script:077]: Script 'timer_dim' restarting (mode: restart)
[19:12:01][I][addon_upload_tft.script.report_settings:178]: TFT URL: http://192.168.1.99:8123/local/nspanel_eu.tft
[19:12:01][I][addon_upload_tft.script.report_settings:179]: Substitutions:
[19:12:01][I][addon_upload_tft.script.report_settings:180]:   nextion_update_url:        http://192.168.1.99:8123/local/nspanel_eu.tft
[19:12:01][I][addon_upload_tft.script.report_settings:181]:   nextion_update_base_url:   https://raw.githubusercontent.com/Blackymas/NSPanel_HA_Blueprint/
[19:12:01][I][addon_upload_tft.script.report_settings:182]:   upload_tft_chunk_size_max: 32768
[19:12:01][I][addon_upload_tft.script.report_settings:183]:   upload_tft_baud_rate:      921600
[19:12:05][D][script:077]: Script 'timer_sleep' restarting (mode: restart)
[19:12:05][D][script:077]: Script 'timer_dim' restarting (mode: restart)
[19:12:24][D][sensor:094]: 'kijelzo RSSI': Sending state -43.00000 dBm with 0 decimals of accuracy
[19:12:35][D][script.set_brightness:2482]: brightness: 10%
[19:12:38][D][sensor:094]: 'ntc_source': Sending state 1.52700 V with 2 decimals of accuracy
[19:12:38][D][resistance:039]: 'resistance_sensor' - Resistance 9646.0Ω
[19:12:38][D][sensor:094]: 'resistance_sensor': Sending state 9646.02344 Ω with 1 decimals of accuracy
[19:12:38][D][ntc:026]: 'kijelzo Temperature' - Temperature: 25.8°C
[19:12:38][D][sensor:094]: 'kijelzo Temperature': Sending state 25.81326 °C with 1 decimals of accuracy
[19:13:05][D][script.timer_sleep:2942]: Going to sleep from page home
[19:13:05][D][script.set_brightness:2482]: brightness: 0%
[19:13:05][D][nextion:464]: Got new page: 9
[19:13:05][D][display.disp1.on_page:717]: Nextion page changed
[19:13:05][D][display.disp1.on_page:718]: New page: screensaver (9)
[19:13:05][D][text_sensor:064]: 'kijelzo Current page': Sending state 'screensaver'
[19:13:05][D][text_sensor:064]: 'kijelzo Detailed Entity': Sending state ''
[19:13:05][D][script.page_changed:2094]: New page: screensaver
[19:13:05][D][sensor:094]: 'kijelzo Page Id': Sending state 9.00000  with 2 decimals of accuracy
[19:13:05][D][sensor.page_id:1367]: New page Id: 9

Home Assistant logs

Logger: homeassistant.components.automation.nspanel_configuration
Source: components/automation/__init__.py:690
Integration: Automatizmus (documentation, issues)
First occurred: 18:16:58 (12 occurrences)
Last logged: 19:11:44

Error while executing automation automation.nspanel_configuration: TypeError: argument of type 'NoneType' is not iterable

Logger: homeassistant.components.automation.nspanel_configuration
Source: helpers/script.py:1792
Integration: Automatizmus (documentation, issues)
First occurred: 18:16:58 (56 occurrences)
Last logged: 19:11:44

NSPanel Configuration: Main choices: NSPanel event: Choose at step 2: Page changed: Choose at step 1: Home page: If at step 7: Error executing script. Error rendering template for variables at pos 2: TypeError: argument of type 'NoneType' is not iterable
NSPanel Configuration: Main choices: NSPanel event: Choose at step 2: Page changed: Choose at step 1: Home page: Error executing script. Error rendering template for if at pos 7: TypeError: argument of type 'NoneType' is not iterable
NSPanel Configuration: Main choices: NSPanel event: Choose at step 2: Page changed: Error executing script. Error rendering template for choose at pos 1: TypeError: argument of type 'NoneType' is not iterable
NSPanel Configuration: Main choices: NSPanel event: Error executing script. Error rendering template for choose at pos 2: TypeError: argument of type 'NoneType' is not iterable
NSPanel Configuration: Error executing script. Error rendering template for choose at pos 2: TypeError: argument of type 'NoneType' is not iterable
feinadam commented 9 months ago

The attributes of the climate.midea_ac_16492674434018_2 entity:

hvac_modes: fan_only, dry, cool, heat, auto, off min_temp: 16 max_temp: 30 target_temp_step: 1 fan_modes: silent, low, medium, high, auto preset_modes: none, eco, sleep, boost swing_modes: off, horizontal, vertical, both current_temperature: 24.1 temperature: 23 fan_mode: auto preset_mode: none swing_mode: off follow_me: false friendly_name: midea_ac_16492674434018 supported_features: 57

djsomi commented 9 months ago

Same here, homepage sensors and climate is dead, after upgrading to 4.2.2!

andythomas commented 9 months ago

I just updated with the climate add-on, but the sensor and the climate page appear to work properly. I used esp-idf before as well as after.

edwardtfn commented 9 months ago

Probably related:

There's a fix for this in dev. Please let me know if you have a chance to try that, so I can proceed to the release.

feinadam commented 9 months ago

I have changed the config for dev: url: https://github.com/Blackymas/NSPanel_HA_Blueprint ref: dev files: [nspanel_esphome.yaml] refresh: 300s

Clean build files, recompile, and reflash.

Same behavior as above. Did I missed something?

illuzn commented 9 months ago

Did you update your HA blueprint to that in dev? That's the key change here.

feinadam commented 9 months ago

That was the point. I have missed the blueprint update.

Ok. Now the entities on the main page looks fine.

The climate page still not working.

Error from log: Logger: homeassistant.components.automation.nspanel_configuration Source: components/automation/init.py:690 Integration: Automatizmus (documentation, issues) First occurred: 10:01:56 (1 occurrences) Last logged: 10:01:56

Error while executing automation automation.nspanel_configuration: TypeError: argument of type 'NoneType' is not iterable

Logger: homeassistant.components.automation.nspanel_configuration Source: helpers/script.py:1792 Integration: Automatizmus (documentation, issues) First occurred: 10:01:56 (5 occurrences) Last logged: 10:01:56

NSPanel Configuration: Main choices: NSPanel event: Choose at step 2: Page changed: Choose at step 1: Climate page: If at step 6: Error executing script. Error rendering template for variables at pos 2: TypeError: argument of type 'NoneType' is not iterable NSPanel Configuration: Main choices: NSPanel event: Choose at step 2: Page changed: Choose at step 1: Climate page: Error executing script. Error rendering template for if at pos 6: TypeError: argument of type 'NoneType' is not iterable NSPanel Configuration: Main choices: NSPanel event: Choose at step 2: Page changed: Error executing script. Error rendering template for choose at pos 1: TypeError: argument of type 'NoneType' is not iterable NSPanel Configuration: Main choices: NSPanel event: Error executing script. Error rendering template for choose at pos 2: TypeError: argument of type 'NoneType' is not iterable NSPanel Configuration: Error executing script. Error rendering template for choose at pos 2: TypeError: argument of type 'NoneType' is not iterable

edwardtfn commented 9 months ago

We have a fix for that issue with climate already on dev and will come to a release very soon. There are others reporting similar issue: