Closed jjl109 closed 2 years ago
Can you turn on additional logging and send me the logs from the startup of the component?
I've set debug on custom_components.lightwave2
but not sure this shows anything useful. See attached.
Interestingly, these logs don't show the binary sensor for my two door sensors even though they are working in HA.
Sorry ignore last sentence - the log does show the magnetic door binary sensors being added, I missed this as was looking in the sensor
section.
So I would expect to see 5 additional binary sensors there as there are 5 motion detectors.
Can you also please set debug on lightwave2.lightwave2
?
See attached.
Presumably the relevant lightwave "feature" is this one of type movement
:
"61dc5c2c18685a0a5f6a4f02-221-3157344058+1":{
"featureId":"61dc5c2c18685a0a5f6a4f02-221-3157344058+1",
"name":"Kitchen motion",
"deviceId":"61dc5c2c18685a0a5f6a4f02-51-3157344058+1",
"groups":[
"61dc5c2c18685a0a5f6a4f02-6355806eca43974156867845"
],
"createdDate":"2022-10-23T17:57:02.260Z",
"attributes":{
"featureId":221,
"deviceId":51,
"type":"movement",
"channel":0,
"writable":false,
"stateless":false,
"virtual":false,
"status":"init",
"name":"Kitchen motion"
}
}
I've just pushed a new beta release where I've tried to include this. I also noticed there is a "lightlevel" sensor which I've tried to include too. Can you test and feed back please?
That's great thanks, I won't be able to test till next week so will feed back then.
I have tested this - I'm afraid it seems to add only the lightlevel sensor but not the actual motion binary sensor.
I had a look in the code, and I think this is what needs to be fixed up: https://github.com/bigbadblunt/lightwave2/pull/5/files https://github.com/bigbadblunt/homeassistant-lightwave2/pull/103/files
I have raised these as draft PRs because I haven't tested this code, and I'm new to both Home Assistant and Python.
I'll happily test if I can work out how to get this code into my HA instance. I could drop in the custom component easily, but I can't work out where home assistant stores the underlying library to drop that in.
Code looks fine, I have included in a new beta release. Thanks!
Getting your edits to the lightwave2 library into your local HA instance is not something I know how to do. Lightwave automatically pulls the libraries using pip. The version number for the library is included in manifest.json. I have to fix the underlying library, upload to pypi, change the version number in the manifest and then HA automatically pulls the new library version. Obviously you can't do this without access to pypi. How to make the changes locally is beyond me.
Yay it works now! I have just made one further PR because I noticed HA wasn't showing the correct icon for motion: https://github.com/bigbadblunt/homeassistant-lightwave2/pull/104
The new Lightwave Gen2 motion sensors (LP70) are discovered by Home Assistant but do not expose any sensor entity for motion/no motion detection.
They show up in HA with only a diagnostic battery level sensor.