Comments (9)
If you do a custom component you could as well fork pydeconz
from deconz.
I am improving pydeconz to map all attributes of devices (including this temperature value) so it will be added to hass in release 88 or 89.
from deconz.
from deconz.
Hmm. If it reports temperature correctly it should appear. Can you enable debug per component documentation and post the json data for that device?
from deconz.
I just saw your post in Svenska hemautomatiseringsgruppen. I didn't realize it is the same as the once in door sensors. There is a different PR requesting support for the door sensors and due to the poor quality of the temp sensor I'm not inclined to add support for it.
from deconz.
As I understand, the readings are not very accurate. I'm not sure if that is because of a bad sensor or bad tuning of the sensor. Personally, my readings are very stable, but it seems to be slightly higher than ground truth, so it might be a tuning problem.
Either way, I understand that you are not inclined to add support for it, but since the temperature is reported to deconz by the sensor, I think it's accurate to report it to home-assistant as well.
from deconz.
I started looking into this and here is an example of what deconz sends on the REST API (badly formated):
"18":{ "config":{ "battery":100, "on":true, "reachable":true, "temperature":2400, "tholddark":12000, "tholdoffset":7000 }, "ep":1, "etag":"6f5621302c442acd784b9d85ee7a191e", "manufacturername":"LUMI", "modelid":"lumi.sensor_motion.aq2", "name":"PIR5", "state":{ "dark":true, "daylight":false, "lastupdated":"2018-10-24T18:22:40", "lightlevel":0, "lux":0 }, "type":"ZHALightLevel", "uniqueid":"00:15:8d:00:02:22:be:5a-01-0400" }, "19":{ "config":{ "battery":100, "duration":60, "on":true, "reachable":true, "temperature":2400 }, "ep":1, "etag":"6f5621302c442acd784b9d85ee7a191e", "manufacturername":"LUMI", "modelid":"lumi.sensor_motion.aq2", "name":"PIR5", "state":{ "lastupdated":"2018-10-24T18:23:41", "presence":false }, "type":"ZHAPresence", "uniqueid":"00:15:8d:00:02:22:be:5a-01-0406" },
The temperature is for some objects stored in the "ZHALightLevel" object as a value in the "config" section and for some under the same sction in the "ZHAPresence" object. And for the Aqara water sensors it is the same place but for the "ZHAWater" object.
One possible solution would be to do similar to how battery is handled in DeconzSensor class and store like this:
self._temperature = device['config'].get('temperature')
Also to note is that some devices have the temperature value but it's always 0.
I guess since the battery is reported and that isn't very accurate (always stuck at 100%) then why shouldn't the temperature be able to be reported?
from deconz.
Same place for different sensors then. Yes that would be the solution.
But apart from Xiaomi there are other devices that send battery in a proper way so just because Xiaomis battery status isn't the most accurate doesn't actually warrant supporting their poor temperature sensor as well ;).
I also want to avoid creating sensors that always report 0 as a value. We have this issue with certain Osram power plugs reporting 0 for power usage. And I really want to avoid a lot of extra checking for devices with 0-values that can be ignored in HASS. Maybe when hass supports ignoring specific entities...
from deconz.
Reporting static 0 values is bad but reporting static 100% values are equally bad. I wish the battery worked because I think the values are actually sent in the zigbee msgs, just in a non-standard way.
I first tried to get the temperature values by making a custom component of deconz in HA but it's not possible for a user of pydeconz to get the temperature values since the values in "device['config']" are not stored anywhere and are thrown away in init. Might be possible to do some python magic but I just need a way to get the temperature value from the object.
Another solution is to store the whole config but that kind of works against the separation of concerns...
A third solution is just that I give up and try to parse the values with a REST component myself.
from deconz.
Related Issues (20)
- Additional lighting effects and control HOT 2
- Expose CLIPGenericFlag sensors from deCONZ as switches to Home Assistant HOT 1
- Support for Philips Hue wall switch module HOT 4
- Deconz integration test issue HOT 1
- Add support for "Range extender" light type HOT 2
- Stuff to clean up from typing HOT 1
- Expose all available attributes of thermostat to HA bundled as device HOT 2
- 'requirements.txt' is missing in Pypi's SDIST since v90 HOT 3
- Feature request: expose more IKEA Starkvind functions to Home Assistant HOT 45
- Support events for Philips Tap Dial Switch HOT 33
- Feature request: expose more Aqara FP1 functions to Home Assistant HOT 5
- Device IP snippets
- Sensors are added to deConz but are not appearing in HA HOT 8
- Styrbar Automations deleted after update to 2023.1 HOT 2
- Smart plug consumption sensor "state is not strictly increasing" in HA HOT 1
- Legrand netatmo thermostat entitie doesn't work
- Unsupported device type ZHAParticulateMatter HOT 5
- Unknown devices for air quality HOT 4
- IKEA badring (Water Leak Sensor) HOT 1
- deCONZ entities: current or voltage are not created in HA
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from deconz.