home-assistant / home-assistant/core
integration mqtt has state class total_increasing
- Dominant language
- Python
- Stars
- 90.5k
- Forks
- 38.6k
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 597
Description
### The problem
Entity sensor.wylacznik_3_energy from integration mqtt has state class total_increasing, but its state is not strictly increasing. Triggered by state 687.44 (previous state: 687.45) with last_updated set to 2026-09-09T01:18:49.647355+00:00.
### What version of Home Assistant Core has the issue?
## System Information version | core-2026.9.1 -- | -- installation_type | Home Assistant OS dev | false hassio | true docker | true container_arch | amd64 user | root virtualenv | false python_version | 3.14.6 os_name | Linux os_version | 6.18.39-haos arch | x86_64 timezone | Europe/Warsaw config_dir | /config Airly can_reach_server | ok -- | -- requests_remaining | 71 requests_per_day | 100 Home Assistant Cloud logged_in | false -- | -- can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | ok HACS GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok HACS Data | ok GitHub API Calls Remaining | 5000 Installed Version | 2.0.5 Stage | running Available Repositories | 4182 Downloaded Repositories | 4 Home Assistant Supervisor host_os | Home Assistant OS 18.2 -- | -- update_channel | stable supervisor_version | supervisor-2026.09.0 agent_version | 1.10.0 docker_version | 29.6.2 disk_total | 30.8 GB disk_used | 6.0 GB nameservers | 192.168.1.1 healthy | true supported | true host_connectivity | true supervisor_connectivity | true ntp_synchronized | true virtualization | kvm board | ova supervisor_api | ok version_api | ok installed_addons | Advanced SSH & Web Terminal (24.1.3), Samba share (12.10.0), Mosquitto broker (7.1.0), File editor (6.1.0), Zigbee2MQTT (2.14.1-1), Get HACS (1.3.1) Dashboards dashboards | 4 -- | -- resources | 1 views | 6 mode | storage Network Configuration adapters | lo (disabled), enp6s18 (enabled, default, auto), docker0 (disabled), hassio (disabled), veth4c70d79 (disabled), veth730ca07 (disabled), vethe087c98 (disabled), veth1df5ac3 (disabled), veth6494c7a (disabled), veth7da6d14 (disabled), vethcd6ffdf (disabled) -- | -- ipv4_addresses | lo (127.0.0.1/8), enp6s18 (192.168.1.45/24), docker0 (172.30.232.1/23), hassio (172.30.32.1/23), veth4c70d79 (), veth730ca07 (), vethe087c98 (), veth1df5ac3 (), veth6494c7a (), veth7da6d14 (), vethcd6ffdf () ipv6_addresses | lo (::1/128), enp6s18 (fe80::6e77:f562:3297:bab5/64), docker0 (fd4d:1580:d6e7::1/64, fe80::9c05:97ff:fee3:a5bc/64), hassio (fd0c:ac1e:2100::1/48, fe80::c03f:8bff:fe60:380b/64), veth4c70d79 (fe80::c421:e1ff:feae:6ffb/64), veth730ca07 (fe80::a008:d1ff:fe81:224c/64), vethe087c98 (fe80::a807:a4ff:fe47:3e43/64), veth1df5ac3 (fe80::408e:1aff:fe28:8af6/64), veth6494c7a (fe80::507e:39ff:fee0:937f/64), veth7da6d14 (fe80::5440:41ff:fe90:16d5/64), vethcd6ffdf (fe80::ac7d:97ff:fe6b:d38e/64) announce_addresses | 192.168.1.45, fe80::6e77:f562:3297:bab5 Recorder oldest_recorder_run | 29 sierpnia 2026 04:47 -- | -- current_recorder_run | 7 września 2026 08:42 estimated_db_size | 177.51 MiB database_engine | sqlite database_version | 3.53.2
### 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
_No response_
### Link to integration documentation on our website
_No response_
### Diagnostics information
_No response_
### Example YAML snippet
```yaml
```
### Anything in the logs that might be useful for us?
```txt
```
### Additional information
_No response_
Contributor guide
Research direction
No source file or test is named. Start by tracing the MQTT integration's handling of sensor.wylacznik_3_energy and reproduce the transition from 687.45 to 687.44; determine how a total_increasing sensor should handle decreases, then add coverage for the reported state change and verify the resulting state-class behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100