Comments (9)
@drjared88 the linked PR on HA fixes this.
from zigpy.
@dmulcahey I tried your PR and I don't know if its working correctly. It seems to just send the switch state every 30 seconds which is causing my automatons to run every 30 seconds.
from zigpy.
Did you change polling on your own? That’s the only way that would happen...
from zigpy.
@dmulcahey No I did not.
I also noticed that with or without your code, my zha switch that if I manually try to change the state, it automatically changed back within a few seconds. It seems like the zha component constantly check the device and is sending an update at that time.
That being said I really don't know what I'm talking about. Just guessing....
from zigpy.
If you're having trouble with automations you might want them set so they detect a change from off to on or on to off rather than just detecting the state. My automations are mostly from "" to "on" or "" to "off" in HA and that works for me - I don't get repeated triggers.
from zigpy.
@ShonkyCH While this would kind of work, it takes me back to my original problem where when the switch and light are out of sync, it won't work. This happens one of two ways. First is when home assistant restarts the switch defaults to on regardless of previous state. The time this happens is if the light is controlled by automation. What ends up happening is the switch is 'on' and the light is 'off' which prevents we from being able from turning the light on without turning the switch off first.
The fix that @dmulcahey has is almost perfect. It is sending the command 'on' state even if the switch is already 'on'. Unfortunately though with the switch continually sending its state ~30 seconds it renders it useless.
from zigpy.
@drjared88 as I mentioned before that isn’t possible unless polling is on. I have 8 of these connected to 2 different systems and I am not experiencing this. Can you disable all of your automations and just watch state updates in the logs to see if it still happens?
from zigpy.
@dmulcahey I think I found my problem... For some reason I was missing this
@property
def should_poll(self) -> bool:
"""Let zha handle polling."""
return False
I must have copy and pasted over top of that but I am guessing that is my issue. Sorry to bother you. You code looks good! Now hopefully it gets rolled into the master branch.
edit I'm not going crazy. In the master branch for 'class Switch' the polling section isn't there. I guess I have learned to copy the whole file instead of just the changed section. With this polling section is also seems to allow me to manually set the state through the API which I wasn't able to do before without it changing back.
from zigpy.
Should be supported in HA 0.93.1 via ZHA Events. Please give it a try and reopen if it doesn't work.
from zigpy.
Related Issues (20)
- Electrical Measurement Cluster not correctly supported? HOT 11
- [REQUEST] Support 6-, 8-, 10-, 12-, 14-, 16- and 18-byte length install code?
- [3.12.0rc2] New enum changes HOT 6
- Legrand OTA issue: "invalid image" HOT 1
- Officially support Develco firmware update (it already works with local .zigbee file) HOT 1
- Attribute read ignored HOT 1
- Feature request: Support Bosch OTA HOT 6
- Ikea TRADFRI GU10 stuck at firmware 0x00010012 HOT 2
- Report attributes with quirks doesn't work as expected HOT 2
- Allow IEEE matching in quirks to help fingerprint Green Power devices
- Can't read zigbee attribute value for type array HOT 14
- EZSP fail to sendUnicast HOT 14
- How to parse/access an incoming ZCL frame? HOT 4
- OTA update fails with Wrong magic number for OTA Image and other errors HOT 4
- SQL query for replacing backups does not work with old backup formats
- [Feature Request] Support of Aeotec Pico (Duo) Switch HOT 3
- Failed to send request: Failed to enqueue message after 3 attempts: <EmberStatus.NO_BUFFERS: 24> HOT 5
- Thread Devices Not available after update to Silicon Labs Multiprotocol 2.4.1 HOT 1
- Device requires a corresponding out cluster when communicating with the coordinator HOT 3
- How to use remote_providers with home assistant and zigpy HOT 4
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 zigpy.