Motion does not expose the motion state but merely allows configuring its behavior (range, enabled or not)
Ambient sensor allows reading the state, so adding a sensor for it would be doable
If someone wants to work on implementing new features to the integration, I can try to help by giving hints here and there but I don’t currently have time to tinker with it myself. Adding new sensors should be straightforward just by modifying core/sensor.py at 7f90fb1cd1c83128cdb6552845dbbfdd434671d2 · home-assistant/core · GitHub to see if the module is available and adding an entity for it.
I am super bummed that nobody has even made an attempt to acknowledge this request. I have seen requests with less votes get addressed that get more attention than this. The product good solution for a function that is not really supplied by any other product.
Has anyone tried Nexete motion switch? You can link it through Tuya, and if you use the localtuya addon you may be able to access all the settings.
I bought a UME smart motion security light which uses Tuya, and in HA it only imported with on/off toggle, but under localtuya I was able to add all the configurable settings which allowed for great automation control. I’m wondering if it’d be the same with the Nexete.
It sounds like it is a limitation of the Kasa local API to not be able to access motion events/etc. Is this true? If so, will look for another switch since it will be unlikely that the HA integration will ever be able to get motion status. This is so close to an ideal switch with sensors!
The current integration is polling. There doesn’t seem to be a push local api. Even if we can figure out a way to poll for motion state the experience would likely be subpar since it would have up to a 5 second delay.
Unless tplink decides to publish docs for a local push api, I would look elsewhere for a similar device
@AJolly what type of configuration changes would you like to see? Feel free to open an issue in python-kasa project and perhaps we can make it happen.
If running kasa --host <addr> feature lists the wanted configuration, adding support requires just modifying some homeassistant code to define the metadata (like icons, translations, etc.). If it is not yet exposed through that “feature” interface, it will require a bit more work but the main hurdle is to know what is useful to expose.
It would be cool if PIR entities could be exposed in Home Assistant so that one can turn the motion sensor on/off from the automations.
The use case would be enabling/disabling the PIR-based cloud actions depending on the state of other switches and external motion sensors.
Another use case for me would be toggling the PIR sensor on/off as sometimes it stops working and I need to toggle it in the Kasa app to make it work again.
If you need help with setting up the test environment, please let me know. I am also available on the homeassistant discord under alias ‘rytilahti’, feel free to contact me privately there if you want.
Is there any way to control if the light turns on/off when the PIR is triggered? Specifically it would be nice if the PIR detection and light turning on were completely independent
Any progress on this making it into the integration? I can see that this got merged into python-kasa 0.7.7, and that got merged into HASS 2024.11.0, but I’ve still got no joy in the front end.
I did enable debugging for a minute and see that PIR and LAS come up for my KS200M, but that’s as far as my skill set takes me.
I assume once they work out the final issues with that we will get something in the TP-Link integration.
Looking at the commit history for the integration, only toggling the PIR sensor has been added.
Also you will likely not see any actual changes to your frontend until a new version of home assistant releases since it is an official Home Assistant integration.
I am excited to see that we are finally getting this feature, a huge thanks to the team working on the integration and python-kasa! Also thanks TP-Link for opening up the firmware so we can have access to the sensors!
Thanks, I hadn’t seen that PR. I too am excited that progress is being made, I’d like to put the Tapo app to sleep. The team deserves huge kudos for keeping this integration native to HA with a Platinum score (although that’s soon to change).
I’ll hold off on thanking TP-Link until they fix/open up their camera firmware for the HACS - Tapo Cameras Control integration.