Closed tanker11 closed 2 years ago
Could be eliminated if it is changed to Feature Request for styling the Card itself...
Have you read the wiki? https://github.com/marcokreeft87/room-card/wiki/Configuration Room Card has styles where you can customize the styling of the card, even with templating (https://github.com/marcokreeft87/room-card/wiki/Configuration#templating)
I have read, yes, but not found out how to do it. I will give it another try and confirm.
Marco Kreeft @.***> ezt írta (időpont: 2022. okt. 25., K, 11:36):
Have you read the wiki? https://github.com/marcokreeft87/room-card/wiki/Configuration Room Card has styles where you can customize the styling of the card, even with templating.. But FYI this is not a bug in room card.
— Reply to this email directly, view it on GitHub https://github.com/marcokreeft87/room-card/issues/107#issuecomment-1290268190, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHVM6O4KAMXKMBMPZNSZNP3WE6SZBANCNFSM6AAAAAARNYVHUU . You are receiving this because you authored the thread.Message ID: @.***>
Tried with the following result: [image: image.png]
As you can see the main entity is also in a box, so I cannot make difference between the card and its container. Is there workaround for this?
Marco Kreeft @.***> ezt írta (időpont: 2022. okt. 25., K, 11:36):
Have you read the wiki? https://github.com/marcokreeft87/room-card/wiki/Configuration Room Card has styles where you can customize the styling of the card, even with templating.. But FYI this is not a bug in room card.
— Reply to this email directly, view it on GitHub https://github.com/marcokreeft87/room-card/issues/107#issuecomment-1290268190, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHVM6O4KAMXKMBMPZNSZNP3WE6SZBANCNFSM6AAAAAARNYVHUU . You are receiving this because you authored the thread.Message ID: @.***>
The image isn't working
Can you share the full yaml of the card?
Sure (sorry, some Hungarian names in it):
type: custom:room-card title: Fürdő entity: light.0_furdo style: | @keyframes spin { from {transform:rotate(0deg);} to {transform:rotate(360deg);} } styles: template: > if (entity.state == 'on') return 'border:solid 1px var(--paper-item-icon-active-color);box-shadow:0px 0px 10px 3px var(--paper-item-icon-active-color)'; else return 'border:solid 1px var(--primary-background-color);box-shadow:none'; tap_action: action: toggle icon: mdi:lightbulb-outline show_icon: true rows:
entities:
entity: switch.0e_ventilation name: Vent show_icon: true icon: template: styles: >
if (entity.state == 'on') return 'animation: spin 1s infinite
linear;color:orangered'
icon: |
return 'mdi:fan';
tap_action: action: call-service service: loxone.event_websocket_command service_data: uuid: 19d9c83d-00de-3c61-ffff33cec634d857 value: pulse hide_if: conditions:
Marco Kreeft @.***> ezt írta (időpont: 2022. okt. 25., K, 12:43):
Can you share the full yaml of the card?
— Reply to this email directly, view it on GitHub https://github.com/marcokreeft87/room-card/issues/107#issuecomment-1290344873, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHVM6O2OQGVQ6DL5NK6WXPTWE62TTANCNFSM6AAAAAARNYVHUU . You are receiving this because you authored the thread.Message ID: @.***>
var(--paper-item-icon-active-color);box-shadow:0px 0px 10px 3px
var(--paper-item-icon-active-color)'; else return 'border:solid 1px
These will set the border around the main entity icon. I guess thats not what you want?
Indeed. My intention is to set the border only around the whole card.
Marco Kreeft @.***> ezt írta (időpont: 2022. okt. 25., Ke 13:41):
var(--paper-item-icon-active-color);box-shadow:0px 0px 10px 3px var(--paper-item-icon-active-color)'; else return 'border:solid 1px
These will set the border around the main entity icon. I guess thats not what you want?
— Reply to this email directly, view it on GitHub https://github.com/marcokreeft87/room-card/issues/107#issuecomment-1290414788, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHVM6O3RUUFVNP4BK4LJVODWE7BPTANCNFSM6AAAAAARNYVHUU . You are receiving this because you authored the thread.Message ID: @.***>
Indeed. My intention is to set the border only around the whole card. Marco Kreeft @.> ezt írta (időpont: 2022. okt. 25., Ke 13:41): … var(--paper-item-icon-active-color);box-shadow:0px 0px 10px 3px var(--paper-item-icon-active-color)'; else return 'border:solid 1px These will set the border around the main entity icon. I guess thats not what you want? — Reply to this email directly, view it on GitHub <#107 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHVM6O3RUUFVNP4BK4LJVODWE7BPTANCNFSM6AAAAAARNYVHUU . You are receiving this because you authored the thread.Message ID: @.>
Remove the 2 lines I quoted and that will do what you want
Thanks, but the two lines make the highlighted shadow around the whole card, too, so if I remove them, it will not work. So it is intentionally there, but not only the whole card, but the main entity icon behaves like the card. In other words I cannot make difference between the card box and entity box... :/
Which version of Room Card? 1.07.00
Describe the bug If a Room Card is used with a certain code of card_mod containing templates, Lovelace GUI reports "connection lost" periodically. Dame card_mod code does not cause same on other card types.
To Reproduce Steps to reproduce the behavior:
Create a Room Card: type: custom:room-card title: Storage entity: light.0f_storage_main tap_action: action: toggle icon: mdi:lightbulb-outline show_icon: true
Add the following code at the end: card_mod: style: | ha-card {
border: {% if is_state('light.0f_storage_main', 'on') %} solid 1px var(--paper-item-icon-active-color) {% else %} solid 1px var(--primary-background-color) {% endif %} ; box-shadow: {% if is_state('light.0_furdo', 'on') %} 0px 0px 10px 3px var(--paper-item-icon-active-color) {% else %} none {% endif %} ;
}
Expected behavior It tries to make a 'glow' effect if the entity is on. And it works on other cards (like a simple entity card).
Desktop (please complete the following information):
HA: Home Assistant 2022.10.1 (Docker) Room Card installed via HACS