Skip to content
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

"today_is_holiday" attribute shown as number in HA? #3

Open
Protoncek opened this issue Feb 7, 2022 · 2 comments
Open

"today_is_holiday" attribute shown as number in HA? #3

Protoncek opened this issue Feb 7, 2022 · 2 comments

Comments

@Protoncek
Copy link

Hi!
I have an odd case:
I have installed your sensor and i use attribute "today_is_holiday" as trigger condition in my automation: it will trigger only if it's false (so automation doesn't trigger when it's holiday).
I entered automation via UI interface, and it never triggers. The cause is that automation assumes that result "false" is a string and creates this:

because this doesn't work:
condition: state
entity_id: sensor.next_holiday
state: 'false'
attribute: today_is_holiday

which doesn't work - automation ends with:

result: false state: false 
wanted_state: 'false'

If i correct it manually in YAML editor to this (note that false is without quotes):

condition: state
entity_id: sensor.next_holiday
state: false
attribute: today_is_holiday

Then it works.
The point is that FIRST example is created by UI automation, while second is corrected in YAML editor. Of course with corrected automation HA complains with this error:
The provided value for 'state' is not supported by the visual editor. We support (string) but received (false)
Do you have any explanation for this behaviour or is it normal?

@partofthething
Copy link
Owner

Hmm I'm not entirely sure. I know YAML will interpret state: false to be a Boolean False rather than the string 'false' so that's part of it.

@Protoncek
Copy link
Author

Ok, thanks for comment. It's kinda weird, though that original HA's UI automation interface creates this wrong...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants