Closed jacobw closed 2 months ago
Changer many debug level logging to info level. Also, the component provides the hvac_action_reason
state attribute that explains why the thermostat is in its current state.
The improved logging will be included in the next release
Thanks for doing this @swingerman, Im looking forward to seeing the new logs when this is released.
I had a Quick Look through the commit and I couldn't see if the logging will include information about which entity is causing the issue in the log, i.e:
01.194 WARNING (MainThread) [custom_components.dual_smart_thermostat.climate] Sensor is stalled, call the emergency stop
This doesn't say which sensor is stalled, and which entity the emergency stop has been called on.
I realise hvac_action_reason is set, but often this is empty by the time I want to look at it, which is why it would be good to log it so I can correlate it with an issue.
When things aren't working, there often aren't useful logs to see what's been happening. I'm not an expert on HA logging but perhaps more logging would be consistent with all of the logging from other parts of HA.
Specifically, in the general logging that shows up in the log book (like info level), it would be great to see when this component starts or stops something, with the reason. I.e:
At the moment I see the switch turn off, and the heat pump turn off, so it feels like im missing the component initiating this. You could argue this is what the debug log is for, but its means you can't look back immediately, and its a fair bit of effort to wait foe issues to happen again after debug is enabled. I also don't see this stuff in the debug log either.
Related to this, the debug logging would be more helpful if it identified specific entities, i.eL
It would be much more helpful if it logged the climate entity and the sensor entity (but the climate entity should be enough) otherwise there's no way to know which entity is having issues, or if it is only one entity or multiple.
Lastly, not really a logging issue, but for the logs above, does it call stop if the climate is already idle or off. I believe the logs above are mostly for an entity that is off, in which case it would be great if it checked and turned it off if it was on, the put that in the log book, and debug logs if its already off.
Thanks, Jacob