Provide more attributes from devices. #683
oleh-shulha
started this conversation in
Ideas
Replies: 1 comment
-
I would love this too, I have a motion and luminance sensor but HA only shows the Motion attribute |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all!
Guys, firstly i would like to express my deepest gratitude for the great integration! Thank you very much, you awesome!
Now closer to the point and my idea. I have several devices that provide attributes that do not exist in HA entity.
Ex. wifi heater
![image](https://user-images.githubusercontent.com/11877591/140974839-d5efe0b3-6264-405d-89db-81054118cac9.png)
![image](https://user-images.githubusercontent.com/11877591/140975124-7bf08a2e-24e2-4818-8758-5fa0164087f2.png)
And this is devise state from tuya API:
As you can see, from API i receive 'work_state' property, which represent current heater state: 'heat' if it works and heat air, and 'warm' if the air temperature has reached the set and heater idle.
Or another example:
![image](https://user-images.githubusercontent.com/11877591/140975620-35eed21e-591c-4a0a-805d-df4cabd71fe8.png)
Tuya WiFi smart plug contains power meter, but not exists in HA entity state attributes:
So, in order to improve automation scripts, it would be great to provide this data so that sensors or other entities can be targeted at them.
In test purpose, i try to extend base.py TuyaEntity by those code:
And now, my entities expose all required data to HA:
![image](https://user-images.githubusercontent.com/11877591/140976141-0e42aa0b-f7e6-4412-ac40-d9da3a2f77e8.png)
Actually the question, do you think it would be useful in official Tuya integration? Of course, well-formed and tested code, not what I showed in the block above.
I would like to have this in the master branch so that I don't support it separately in my fork.
I would be glad to hear your opinion, thank you!
Beta Was this translation helpful? Give feedback.
All reactions