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
Hide_if does not work with switch or helper #108
Comments
Thanks for the quick response.
No error in the editor window.
But still no luck on row level nor entity level.
The switch is created in Node-red in my case.
Or if you can try with creating an input_boolean in helpers of HA...
Marco Kreeft ***@***.***> ezt írta (időpont: 2022. okt. 25.,
K, 11:43):
… Does it give you an error? Because its working here:
[image: image]
<https://user-images.githubusercontent.com/10223677/197740696-a35c240f-06b4-44ab-9180-ee487e095dce.png>
—
Reply to this email directly, view it on GitHub
<#108 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHVM6OZ4ISNMJYCQJI2YHWTWE6TS3ANCNFSM6AAAAAARNY62NQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Tested with a switch.xxx entity that is not created by HA helper, not
working either.
Let me know how I could help in finding out the issue.
Marco Kreeft ***@***.***> ezt írta (időpont: 2022. okt. 25.,
K, 11:43):
… Does it give you an error? Because its working here:
[image: image]
<https://user-images.githubusercontent.com/10223677/197740696-a35c240f-06b4-44ab-9180-ee487e095dce.png>
—
Reply to this email directly, view it on GitHub
<#108 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHVM6OZ4ISNMJYCQJI2YHWTWE6TS3ANCNFSM6AAAAAARNY62NQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
What are the states the switch can have? |
'on' and 'off', same for all entities I tested.
Update: I realized that hide_if for the row works only with entities that
are already in on the card.
It won't work with others 'outside' of the card's scope. Is this a desired
behavior?
For me it would mean to add an entity only because I want to control the
visibility...
Marco Kreeft ***@***.***> ezt írta (időpont: 2022. okt. 25.,
K, 12:35):
… What are the states the switch can have?
—
Reply to this email directly, view it on GitHub
<#108 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHVM6O43F5X4SGPGKZLFPQLWE6ZWZANCNFSM6AAAAAARNY62NQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
It will work with every entity within Home Assistant. I think it got something to do with the enitiy you are using. Since you report it is working with a light entity. The card call hass to get the state or attribute value so it doest make any difference in type of entity. There are multiple users of room card that use this functionality, it even is unit tested on every release. As long as I can't reproduce I can't fix it for you. So I hate to say it, but the only one who can fix this issue for you, is you. Or provide me with more data, but I don't see how |
Also don't work for me. `type: custom:room-card |
Thats because you didnt use the example code:
This should work |
Yep, this version works. entities: Thanks. Good Job! |
Ah yeah, that needed to be updated. Sorry about that |
I also made further tests, I can confirm if the entity is on the card, it
will work with hide_if.
If not, it won't.
Marco Kreeft ***@***.***> ezt írta (időpont: 2022. okt. 26.,
Sze, 14:37):
… Yep, this version works. I used your examples from wiki , and i am wrong
understanding this:
entities: - entity: light.mancave name: Ceiling hide_if: entity:
sensor.light_unavailable state: true tap_action: action: toggle
Thanks. Good Job!
Ah yeah, that needed to be updated. Sorry about that
—
Reply to this email directly, view it on GitHub
<#108 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHVM6OYWU4RTOLQZQNVWGZDWFEQX3ANCNFSM6AAAAAARNY62NQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Show me |
I also have had the issue where I could only hide based on an entity already in the room card. I've found a work around for now which might be helpful to others. In my use case I have an input boolean I use to toggle if the holiday lights (christmas tree, outside lights, etc) are up. I then use this to control if automations for them should run and to hide them in the UI when they aren't. I was trying this but it didn't work because the input_boolean wasn't in the card as an entity in itself:
I added the input_boolean as an info_entity and the above then worked as expected. I then tried setting the input_boolean info_entity with a hide condition that always made it hidden as follows: info_entities:
This hid the info_entity but didn't stop the hide_if on the light entity working. This seems like a work around at least for now. |
Yes I fixed a similar issue with icon conditions. I wanted to fix this for hide_if also but due to a very busy schedule I forgot. FYI: The entity doesnt need to be on the card. The only reason that helps is because every entity on the card will trigger an update of the card when it changes state. Since the card isnt including the entities used in hide_if currently, only a refresh of the page, or your workaround will help refresh the card. |
@MattFryer can you please make a seperate bug for your issue? That will help me do administration and dont forget |
@MattFryer can you check out v1.07.03? That should fix your problem |
@marcokreeft87 sorry, only just seen the message about making another bug report. Just tested and v1.07.03 fixed the issue for me. Works perfectly without the work around. Thanks for the quick turn around! |
Which version of Room Card?
1.07.00
Describe the bug
Hide_if works well with light.xxx entities, but won't with input_boolean.xxx (created by HA in helpers section) or switch.xxx entities created in Node-Red.
To Reproduce
Steps to reproduce the behavior:
Create a Room Card containing the below type of hide_if:
rows:
name: Ceiling
show_icon: true
tap_action:
action: toggle
name: Mirror
icon: mdi:mirror-rectangle
show_icon: true
tap_action:
action: toggle
hide_if:
conditions:
entity: switch.visibility_0e
value: 'on'
Expected behavior
It should work with any boolean type of entities, not only with one (some) of them.
Desktop (please complete the following information):
OS: Win10
Browser Firefox
Version 105.03
HA: Home Assistant 2022.10.1 (Docker)
Room Card installed via HACS
The text was updated successfully, but these errors were encountered: