Enhancement
Direct connection to BT temperature sensor with the fallback option
#2341
Labels
Add-on: Bluetooth
Covers both BLE Tracker and Bluetooth Proxy related issues.
Customization
Suggests features or modifications tailored to specific user groups.
Enhancement
For suggestions that add new features or improve existing functionalities.
Enhancement Summary
Direct connection to BT temperature sensor with the fallback option
Detailed Description
Hi!
I highly appreciate what you are doing with NS Panel, this brings this hardware to the whole new level. So I thought I might share with you and the community something what works quite stable for me since last 3 months and I would say elevates NS Panel even a bit more.
Problem statement
As everyone here knows, temperature sensor is quite bad in NS Panel, not actually bad, but highly impacted by NS Panel own temperature. Yes, we can set up an offset to compensate, but NS Panel own temperature is not stable as well. It deepens on Brightness(I'm setting it based on light sensor) and if some other features are enabled at the moment.
Currently we do have am option to use external temperature sensor from HA, which also works until...HA is there. I believe, thermostat is a kind of device, that not just should, but must be able to work completely standalone.
Idea
NS Panel and ESP32 in general could connect to BLE temperature sensor directly, but even that was not enough for me, I wanted to have a fallback option to NS Panel internal temperature sensor, if Bluetooth sensor is not available, so the climate function could stay as stable as possible. So here we go:
**Pre-requisites **
- esphome/nspanel_esphome_addon_ble_tracker.yaml
Code
Let's add some flag to let HA know which sensor is currently used:
Now adding a bt temperature sensor (xiaomi_lywsdcgq in my case) to esphome config and setting up a 60s update limit in oder not to spam our climate with a new value every second:
And here is the most interesting part. We need to build a new temperature sensor, which will switch between Bluetooth and internal sensors based on the first one availability:
The last step left. Nothing will work until we extend builtin climate with our new consolidated sensor:
Thanks!
Bonus
Almost every bt sensor has a humidity sensor on board as well. So this could be also included and used for some internal logic or automation
Additional Context
No response
The text was updated successfully, but these errors were encountered: