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
71.11k stars 29.79k forks source link

Automation And if (optional) using the wrong 'else' #122157

Open fixx-er opened 1 month ago

fixx-er commented 1 month ago

The problem

Not sure if this goes into the core part, but when there is a condition in the "And if (optional)" part of an Automation and a person puts another IF under the proceding "THEN" and put an "ELSE", the "And if (optional)" uses that "ELSE". "And if (optional)" should not use an else at all. I have had to work aroound this by adding conditions after the "THEN"

Core 2024.7.2 Supervisor 2024.06.2 Operating System 12.4 Frontend 20240710.0

See snapshot: bad AND IF

What version of Home Assistant Core has the issue?

2024.7.2

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Supervised

Integration causing the issue

Automation

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

fixx-er commented 1 month ago

here are the last two traces I could find. It can be recreated if need be. trace automation.weather_for_cooler 2024-07-19T04_07_25.131565+00_00.json trace automation.weather_for_cooler 2024-07-19T06_08_21.660241+00_00.json

fixx-er commented 1 month ago

Old code:

`alias: Weather for cooler description: switch cooler modes when raining trigger:

New code:

`alias: Weather for cooler description: switch cooler modes when raining trigger:

home-assistant[bot] commented 1 month ago

Hey there @home-assistant/core, mind taking a look at this issue as it has been labeled with an integration (automation) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `automation` 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 automation` 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)


automation documentation automation source (message by IssueLinks)

fixx-er commented 1 month ago

I have been quite busy, but after this week I will try and duplicate again. There has been many reboots and some updates. I want to retest again and document.