Dear Coders,
I’m using SVG image with ExperienceLovelace ‘ha-floorplan’. I would like to add ‘custom:hui-element’ cards to it, but it doesn’t work. My code:
views:
- title: Love-02
path: floorplan
theme: theme-3dsmax
type: panel
cards:
- type: custom:floorplan-card
config:
image: '/local/images/floorplan_optimized.svg'
stylesheet: '/local/floorplan.css'
console_log_level: error
log_level: info
rules:
- entities:
- switch.light_01
- switch.light_02
tap_action: false
state_action:
action: call-service
service: floorplan.class_set
service_data: 'light-${entity.state}'
- entities:
- switch.light_01
- switch.light_02
tap_action:
action: 'toggle'
state_action:
action: call-service
service: floorplan.style_set
service_data:
element: "${entity.entity_id.replace('switch.', 'light_overlay.')}"
style: |
>
if( entity.state !== "on" ) return "display: none;";
return `
display: block;
filter:
brightness( calc( ${entity.attributes.brightness}/255 ) );
# Would like to add this 'markdown' content
- type: custom:hui-element
card_type: markdown
content: "This is the content."
style:
left: 50%
top: 50%
width: 300px
Could you help me, please?
Thank you in advance.