-
Notifications
You must be signed in to change notification settings - Fork 21
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
Can't configure power source on initial network enrollment #28
Comments
Hey, I have a config here that is picked up by ZHA as battery powered with correct level readings: https://github.com/simmsb/zigbee_fairy_lights/blob/master/fairylights.yaml#L113 |
@simmsb Thanks! I finally have battery percentage reported in ZHA! I initially tried to just copy your I see one commit you have to |
Hmm, I'm getting errors like this now:
Specifically when I try to take your change and merge it into this repo, but also even if I'm still using your fork it's started to do this seemingly inexplicably. Using this repo directly still works fine, but doesn't give me back battery voltage. Not sure what's changed, I've even tried running Seeing logs like this further up as well:
|
I didn't look into battery powered devices yet, but I think there is a bug that needs a fix with the So setting I would try to remove all |
Yeah, I think I encountered similar issues (at least when turning off rx_on_when_idle) and a combination of removing (/force removing) the device from the zigbee network and factory resetting it would allow it to connect again. I think the issue is rx_on_when_idle while the device is bound to the network. |
Indeed, running |
Hi there,
I'm trying to setup an ESP32-C6 as a battery-based device with deep-sleep to initialize once every hour to take some measurements, including battery state, and report it to HA via ZHA.
I've gotten the device to boot and successfully enroll in the ZHA network and report things like temperature and humidity from an AHT20. However, in Home Assistant the device does not appear to display any battery entity. I suspect it's because the ZHA integration reports the Power Source is Mains, so HA does not assume there's a battery entity.
I've tried to configure the
power_supply: 0x03
under thezigbee
configuration in the esphome yaml file, as the ZCL reports that 0x03 is the enum for battery. I've even tried to manually configure theBASIC
cluster with the Power Source attribute and thePOWER_CONFIG
as follows:Even if I remove the
BASIC
cluster configuration and leave just thepower_supply: 0x03
, the "Manage zigbee device" dialog lets me query thepower_source
attribute of theBASIC
cluster and yieldsPowerSource.Battery
, and if I remove thepower_supply: 0x03
, it'll now yieldPowerSource.Unknown
.Help me understand what needs to happen so that ZHA will report this device as a battery device and successfully display the battery entity data for it.
The text was updated successfully, but these errors were encountered: