Add diagnostic logging for temperature setpoint with no_off_system_mode TRVs#1781
Add diagnostic logging for temperature setpoint with no_off_system_mode TRVs#1781
Conversation
Co-authored-by: wtom <1482002+wtom@users.noreply.github.com>
Co-authored-by: wtom <1482002+wtom@users.noreply.github.com>
Co-authored-by: wtom <1482002+wtom@users.noreply.github.com>
|
@copilot has nothing todo with the valve position. please revert everything you did and check if the setpoint is set to 5°C if the trv has no off mode. |
Per maintainer feedback, reverted all valve position control logic. Added INFO-level logging to diagnose temperature setpoint issues for TRVs with no OFF mode. Co-authored-by: wtom <1482002+wtom@users.noreply.github.com>
Reverted all valve position logic in commit 8166ce0. Added INFO-level diagnostic logging to track when temperature is set to min_temp for no_off_system_mode TRVs. The existing logic should already set temperature to min_temp when window opens, but I notice the diagnostic data shows The logs will now show:
This should help identify if the setpoint logic is executing correctly when windows open. |
Motivation:
TRVs without OFF mode support (e.g., Shelly BLU TRV) with
no_off_system_modeenabled may not be setting temperature to min_temp when windows open. The existing logic should handle this, but diagnostic logging is needed to verify the setpoint is being correctly applied.Changes:
no_off_system_modelogic triggers and sets temperature to min_tempwindow_open,hvac_mode, andno_off_system_modeflagModified
custom_components/better_thermostat/utils/controlling.py:no_off_system_modetemperature overrideNote: Diagnostic data shows
binary_sensor.windows_in_bedroomlisted as "missing_entity" in issues section, which may indicate the window sensor is unavailable at times and could prevent Better Thermostat from detecting window opens.Related issue (check one):
Checklist (check one):
Test-Hardware list (for code changes)
User testing required to capture logs when window opens.
Steps to test:
HA Version: 2025.12.3+
TRV Hardware: Shelly BLU TRV or similar no-OFF-mode devices
New device mappings
N/A - no device mappings changed.
Original prompt
This section details on the original issue you should resolve
<issue_title>Opening the window and turning off the heating doesn't quite work.</issue_title>
<issue_description>
Description
I'm having trouble turning off the radiators when a window is opened. My configuration is set to 3 minutes after window opening. The auxiliary sensor for several windows is set correctly and visible in the configuration. However, BetterT shows a window icon (which I assume detects the window opening), sets the radiator to off, but the valve is still open. I don't know if this is related to the valve itself or the BT. What I found interesting is that in the diagnostic data at the very bottom, under "issues," there's information about missing entities.
Steps to Reproduce
Expected behavior:
Until the window closing time has elapsed, the valves should remain closed.
Actual behavior:
The valves are still open and heat unnecessarily.
Versions and HW
Home Assistant: 2025.12.3
Better Thermostat: 1.7.0
TRV(s): Shelly BLU TRV
Debug data
diagnostic data
{ "home_assistant": { "installation_type": "Home Assistant OS", "version": "2025.12.3", "dev": false, "hassio": true, "virtualenv": false, "python_version": "3.13.9", "docker": true, "arch": "aarch64", "timezone": "Europe/Warsaw", "os_name": "Linux", "os_version": "6.12.25-haos-raspi", "container_arch": "aarch64", "supervisor": "2025.12.3", "host_os": "Home Assistant OS 16.0", "docker_version": "28.3.0", "chassis": "embedded", "run_as_root": true }, "custom_components": { "rpi_gpio": { "documentation": "https://github.com/thecode/ha-rpi_gpio", "version": "2025.2.1", "requirements": [ "gpiod>=2.2.1" ] }, "better_thermostat": { "documentation": "https://github.com/KartoffelToby/better_thermostat", "version": "1.7.0", "requirements": [] }, "spotcast": { "documentation": "https://github.com/fondberg/spotcast", "version": "v4.0.1", "requirements": [ "spotipy==2.23.0" ] }, "adaptive_lighting": { "documentation": "https://github.com/basnijholt/adaptive-lighting#readme", "version": "1.28.0", "requirements": [ "ulid-transform" ] }, "nodered": { "documentation": "https://zachowj.github.io/node-red-contrib-home-assistant-websocket/guide/custom_integration/", "version": "4.1.5", "requirements": [] }, "spook": { "documentation": "https://spook.boo", "version": "4.0.1", "requirements": [] }, "google_home": { "documentation": "https://github.com/leikoilja/ha-google-home", "version": "1.13.1", "requirements": [ "glocaltokens==0.7.6" ] }, "powercalc": { "documentation": "https://docs.powercalc.nl", "version": "v1.19.4", "requirements": [ "numpy>=1.21.1" ] }, "switch_manager": { "documentation": "https://github.com/Sian-Lee-SA/Home-Assistant-Switch-Manager", "version": "2.0.5", "requirements": [] }, "presence_simulation": { "documentation": "https://github.com/slashback100/presence_simulation", "version": "5.1", "requirements": [] }, "fordpass": { "documentation": "https://github.com/itchannel/fordpass-ha", "version": "0.1.68", "requirements": [] }, "auto_backup": { "documentation": "https://github.com/jcwillox/hass-auto-backup", "version": "1.8.1", "requirements": [] }, "battery_notes": { "documentation": "https://andrew-codechimp.github.io/HA-Battery-Notes/", "version": "3.1.0", "requirements": [] }, "zha_toolkit": { "documentation": "https://github.com/mdeweerd/zha-toolkit", "version": "v1.1.33", "requirements": [ "aiofiles>=0.4.0", "pytz>=2016.10" ] }, "multizone_controller": { "documentation": "https://github.com/Petro31/ha-integration-multizone-controller", "version": "1.2", "requirements": [] }, "energy_meter": { "documentation": "https://github.com/zeronounours/HA-custom-component-energy-meter", "version": "1.1.0", "requirements": [] }, "snowtire": { "documentation": "https://github.com/Limych/ha-snowtire", "version": "1.6.0", "requirements": [ "pip>=21.3.1" ] }, "samsungtv_tizen": { "documentation": "https://github.com/jaruba/ha-samsungtv-tizen", "vers... </details> <!-- START COPILOT CODING AGENT SUFFIX --> - Fixes KartoffelToby/better_thermostat#1760 <!-- START COPILOT CODING AGENT TIPS --> --- ✨ Let Copilot coding agent [set things up for you](https://github.com/KartoffelToby/better_thermostat/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot) — coding agent works faster and does higher quality work when set up for your repo.