-
Notifications
You must be signed in to change notification settings - Fork 725
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Device Support] Neo temperature humidity and illumance sensor quirk #926
Conversation
Hello @marciogranzotto , first: Thanks for your great work! Unfortunately it does not work form me. :( I have added the file to my custom quirk directory and already tried resetting and reconnecting the device. The states of temperature and humidity are unknown and I am getting the following errors:
|
@walnuss0815 I don't think your problem is releated with this change, since it looks like a communication issue. Can you test if you still have the problem without this code change? I have two of those sensors and I was able to add them flawlessly |
I've removed the code change and two of the log messages were gone. After I added the code change again the log messages were back. So it apears that the following log entries are caused by the the code change:
|
@walnuss0815 but without these changes can you add the device and see its illuminance and battery info? @blakadder, @Vebryn - do you guys experience the same problem? or it works for you? |
@marciogranzotto right, before I added the file there only were the battery info and the illuminance. The latest commit did not fix the issue. Temperature and humidity are still unknown. |
zhaquirks/tuya/neo_TS0201.py
Outdated
def __init__(self, device, endpoint_id): | ||
super().__init__(device, endpoint_id) | ||
self.info("Forcing discovery information for Neo custom endpoint") | ||
|
||
self.profile_id = zha.PROFILE_ID | ||
self.device_type = DeviceType.TEMPERATURE_SENSOR | ||
self.device_type = zigpy.profiles.zha.DeviceType(self.device_type) | ||
|
||
self.add_input_cluster( | ||
TemperatureMeasurement.cluster_id, | ||
TemperatureMeasurement(endpoint=self, is_server=True), | ||
) | ||
self.add_input_cluster( | ||
RelativeHumidity.cluster_id, | ||
RelativeHumidity(endpoint=self, is_server=True), | ||
) | ||
self.status = zigpy.endpoint.Status.ZDO_INIT |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need for this. The reason why the replacement endpoint id 2 failed, is because you did not have PROFILE_ID defined in the replacement. I've checked and you can add a new endpoint via replacement
Codecov Report
@@ Coverage Diff @@
## dev #926 +/- ##
==========================================
+ Coverage 82.58% 82.65% +0.06%
==========================================
Files 190 191 +1
Lines 4807 4825 +18
==========================================
+ Hits 3970 3988 +18
Misses 837 837
Continue to review full report at Codecov.
|
Pull Request Test Coverage Report for Build 1156504411
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Flake8 changes
Co-authored-by: Alexei Chetroi <lexoid@gmail.com>
Co-authored-by: Alexei Chetroi <lexoid@gmail.com>
@Adminiuga good to go? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm
Implements temperature and humidity for the Neo TS0201 _TZ3000_qaaysllp sensor: #862
Thanks to @blakadder, @Vebryn, and all others involved in the issue discussion!