home-assistant / home-assistant/core
ZHA entity states never update in HA (switch, sensor, select, update) while library state is correct
- Dominant language
- Python
- Stars
- 90.8k
- Forks
- 38.7k
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 597
Description
### The problem
On 2026.9.1, ZHA entity states in Home Assistant appear to be frozen at their
initial value. The ZHA library emits `state_changed` events with correct values,
`homeassistant.components.zha.entity` logs that it handled them, and the entity
state in Developer Tools → States never changes.
This affects every ZHA entity I have checked on the device — `switch`, `sensor`,
`select` and `update`.
Device: SONOFF S60ZBTPF Zigbee smart plug, firmware 0x00002005, quirk
`zhaquirks.sonoff.s60zbtpf` applied. The device executes every command correctly
and reports its state back; device diagnostics confirm the library tracks it
perfectly at all times. Commands from HA reach the device and work — only the
state coming back is not reflected.
### Log evidence
**Switch.** Turning the plug OFF from the UI at 12:37:39:
```
2026-09-09 12:37:39.582 DEBUG (MainThread) [zha] Emitting event state_changed with data
EntityStateChangedEvent(event_type='entity', event='state_changed',
platform=, unique_id='-1', device_ieee=,
endpoint_id=1, group_id=None, state_diff={'is_on': }) (1 listeners)
2026-09-09 12:37:39.583 DEBUG (MainThread) [homeassistant.components.zha.entity]
switch.enchufe_lavadora: Handling event from entity:
EntityStateChangedEvent(..., state_diff={'is_on': })
```
The plug is then physically off (relay open, LED dark, no power at the socket) and
Developer Tools → States shows `switch.enchufe_lavadora` = `on`.
Same pattern for the ON transition at 12:37:14 with
`state_diff={'is_on': }`.
**Sensor.** The voltage sensor emits and handles an event roughly every 10 seconds
throughout the log, e.g.:
```
2026-09-09 12:37:37.049 DEBUG (MainThread) [zha] Emitting event state_changed with data
EntityStateChangedEvent(..., platform=,
unique_id='-1-2820-rms_voltage', state_diff={'native_value': 229.41}) (1 listeners)
2026-09-09 12:37:37.049 DEBUG (MainThread) [homeassistant.components.zha.entity]
sensor.enchufe_lavadora_voltage: Handling event from entity: ...
```
Across the ~4 minute log there are 13 such events, with values ranging 228.6 to
231.51. Developer Tools → States shows `sensor.enchufe_lavadora_voltage` = **222.13**,
a value that appears in none of them.
So this is not specific to the switch platform, and not specific to the value type
(`float` fails the same way a `Bool` enum does).
**Select and update.** These two entities are also permanently wrong:
- `select` (Power-on behavior): library reports `current_option: "On"` and the raw
attribute `start_up_on_off` = 1; UI shows `PreviousValue`. Changing it does reach
the device (raw attribute changed 0 → 1, and the plug now restores to on after a
physical power cut), but the UI reverts after ~2 s.
- `update` (firmware): library reports `installed_version: 0x00002005` and
`latest_version: 0x00002005`, i.e. up to date; HA entity state is `unknown`.
Note that **no `Platform.SELECT` or `Platform.UPDATE` events appear in the log at
all** during the reproduction, so these two may fail for a different reason than
the switch and sensor, which do emit events.
### Reproduction
Freshly restarted HA, ZHA debug logging enabled, plug physically OFF at the start.
One diagnostics download after each step.
| # | Action | Real state | `on_off` | `is_on` | `start_up_on_off` | lib `select` | HA UI |
|---|---|---|---|---|---|---|---|
| 1 | (after restart) | off | 0 | 0 | 1 | On | switch **on**, behavior **PreviousValue**, firmware **unknown** |
| 2 | Set Power-on behavior | off | 0 | 0 | 1 | On | reverts to **PreviousValue** after ~2 s |
| 3 | Toggle switch off | off | 0 | 0 | 1 | On | reverts to **on** after ~2 s |
| 4 | Toggle off, then immediately on | **on** | **1** | **1** | 1 | On | stays **on** |
| 5 | Toggle switch off | off | 0 | 0 | 1 | On | reverts to **on** after ~2 s |
Diagnostics `last_seen` timestamps match the logged switch events exactly
(10:37:15 UTC ↔ 12:37:14.568 local ON; 10:37:39 UTC ↔ 12:37:39.582 local OFF).
The UI values in the last column are identical at every step and identical to what
was shown immediately after the restart, which is what suggests the states are
simply frozen at their initial value.
### What version of Home Assistant Core has the issue?
core-2026.9.1
### What was the last working version of Home Assistant Core?
_No response_
### What type of installation are you running?
Home Assistant OS
### Integration causing the issue
Zigbee Home Automation (ZHA)
### Link to integration documentation on our website
https://www.home-assistant.io/integrations/zha
### Diagnostics information
Attached: five device diagnostics for the plug (one per step above), plus
diagnostics for a second S60ZBTPF and for the Home Assistant Connect ZBT-2
coordinator.
### Example YAML snippet
```yaml
```
### Anything in the logs that might be useful for us?
```txt
Full ZHA debug log attached, covering the whole reproduction from restart.
Relevant lines quoted above.
```
### Additional information
Environment:
- Home Assistant Core 2026.9.1, Supervisor 2026.08.0, HAOS 18.2
- Python 3.14.6, x86_64 (Intel NUC)
- `zha==2.2.1`, `zha-quirks==2.2.1`
- Coordinator: Home Assistant Connect ZBT-2
- No custom components installed
- Device link healthy: LQI ~130-140, RSSI ~-66 dBm, `available: true`,
`last_seen` current in every snapshot
A second S60ZBTPF on the same network shows the same behaviour, so this is not
specific to one unit.
[lavadora_zha_1-01M1XP9VWH2VQB1NBGHXJ4ECC4-SONOFF S60ZBTPF-b2c289dad26ca35a1cecfd4071d16d61.json](https://github.com/user-attachments/files/32004534/lavadora_zha_1-01M1XP9VWH2VQB1NBGHXJ4ECC4-SONOFF.S60ZBTPF-b2c289dad26ca35a1cecfd4071d16d61.json)
[lavadora_zha_2-01M1XP9VWH2VQB1NBGHXJ4ECC4-SONOFF S60ZBTPF-b2c289dad26ca35a1cecfd4071d16d61.json](https://github.com/user-attachments/files/32004539/lavadora_zha_2-01M1XP9VWH2VQB1NBGHXJ4ECC4-SONOFF.S60ZBTPF-b2c289dad26ca35a1cecfd4071d16d61.json)
[lavadora_zha_3-01M1XP9VWH2VQB1NBGHXJ4ECC4-SONOFF S60ZBTPF-b2c289dad26ca35a1cecfd4071d16d61.json](https://github.com/user-attachments/files/32004545/lavadora_zha_3-01M1XP9VWH2VQB1NBGHXJ4ECC4-SONOFF.S60ZBTPF-b2c289dad26ca35a1cecfd4071d16d61.json)
[lavadora_zha_4-01M1XP9VWH2VQB1NBGHXJ4ECC4-SONOFF S60ZBTPF-b2c289dad26ca35a1cecfd4071d16d61.json](https://github.com/user-attachments/files/32004549/lavadora_zha_4-01M1XP9VWH2VQB1NBGHXJ4ECC4-SONOFF.S60ZBTPF-b2c289dad26ca35a1cecfd4071d16d61.json)
[lavadora_zha_5-01M1XP9VWH2VQB1NBGHXJ4ECC4-SONOFF S60ZBTPF-b2c289dad26ca35a1cecfd4071d16d61.json](https://github.com/user-attachments/files/32004553/lavadora_zha_5-01M1XP9VWH2VQB1NBGHXJ4ECC4-SONOFF.S60ZBTPF-b2c289dad26ca35a1cecfd4071d16d61.json)
[frigo_zha-01M1XP9VWH2VQB1NBGHXJ4ECC4-SONOFF S60ZBTPF-d0e8b5cae9b29e148b314c8e73f90fdb.json](https://github.com/user-attachments/files/32004555/frigo_zha-01M1XP9VWH2VQB1NBGHXJ4ECC4-SONOFF.S60ZBTPF-d0e8b5cae9b29e148b314c8e73f90fdb.json)
[zbt2_zha-01M1XP9VWH2VQB1NBGHXJ4ECC4-Home Assistant Connect ZBT-2-bb827ad88e3a51dca40ccfc523f169e1.json](https://github.com/user-attachments/files/32004563/zbt2_zha-01M1XP9VWH2VQB1NBGHXJ4ECC4-Home.Assistant.Connect.ZBT-2-bb827ad88e3a51dca40ccfc523f169e1.json)
[home-assistant_2026-09-09T10-38-09.974Z.log](https://github.com/user-attachments/files/32004568/home-assistant_2026-09-09T10-38-09.974Z.log)
Contributor guide
Assessment
This issue has not been assessed yet.