home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
69.7k stars 28.86k forks source link

Automation trigger is incorrectly fired in 2024.6 #119004

Open nazar-pc opened 3 weeks ago

nazar-pc commented 3 weeks ago

The problem

I have automation trigger that is fired when there is a power level transition. In 2024.5.4 it was fired when there was a change, now in 2024.6 it is fired many times a day even when there was no such transition.

Looks like a regression to me, I also do not see an open issue for something like this or mention of such change in release notes.

What version of Home Assistant Core has the issue?

core-2024.6.0

What was the last working version of Home Assistant Core?

core-2024.5.4

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

alias: Power on
description: ""
trigger:
  - platform: numeric_state
    entity_id: sensor.solax_x1_hybrid_g4_grid_power
    below: -1
condition: []
action:
  - device_id: 77469a77222a02e4022c230d82564dd6
    domain: mobile_app
    type: notify
    message: ⚡ Power on
mode: single

Anything in the logs that might be useful for us?

No response

Additional information

No response

mib1185 commented 3 weeks ago

Which integration provides the sensor.solax_x1_hybrid_g4_grid_power? Further please check and provide the history graph of this entity.

nazar-pc commented 3 weeks ago

It is solax integration.

It looks like this: sensor.solax_x1_hybrid_g4_grid_power.csv

I now see there are some "unavailable" entries there that likely cause this, which were not happening in 2024.5.4. Is that a new behavior in the integration or HA itself?

home-assistant[bot] commented 3 weeks ago

Hey there @squishykid, mind taking a look at this issue as it has been labeled with an integration (solax) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `solax` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign solax` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


solax documentation solax source (message by IssueLinks)

Darsstar commented 1 week ago

I now see there are some "unavailable" entries there that likely cause this, which were not happening in 2024.5.4. Is that a new behavior in the integration or HA itself?

This is caused by https://github.com/home-assistant/core/pull/117767

It should only happen after the solax library is unable to receive a valid response three times in a row. I think updating your automation is the best way forward.

nazar-pc commented 1 week ago

Hm... from my experience Solax inverters (I had two) are notoriously bad with Wi-Fi and sometimes stop responding for a few seconds or have multi-seconds pings. Is there a way to override the behavior somehow?