Hey!
I have a hack solution but feel like maybe missing a trick to have it working how I would like
I have base image of my office with the light off and when presence is detected it goes to the base image of light on.
I got two PC images so I can use them as an overlay on the image to show when and which PC is on but I’ve found getting the position a bit of a nightmare like its off on desktop it looks just about right on mobile and tablet. I also notice like a blue spinner as if its trying to load something
The hacky stuff was mainly using card_mod to try align things
type: picture-elements
elements:
- type: image
style:
left: 50%
top: 50%
width: 100%
entity: binary_sensor.office_occupancy
tap_action:
action: none
hold_action:
action: none
state_image:
'on': >-
http://homeassistant.local:8123/local/dashboard/office/office-light-only.png
card_mod:
style:
hui-image $: |
.container {
width: 100%;
max-height: 100vh;
pointer-event: none;
}
#image {
display: block;
width: auto;
height: auto;
max-width: 100%;
pointer-event: none;
max-height: 100vh;
margin: 0 auto;
object-fit: contain;
}
- type: image
style:
left: 50%
top: 50%
width: 100%
title: AJ
entity: sensor.aj_pc_monitorpowerstate
state_image:
PowerOn: http://homeassistant.local:8123/local/dashboard/office/aj-pc-on.png
tap_action:
action: none
hold_action:
action: none
card_mod:
style:
hui-image $: |
.container {
width: 100%;
max-height: 100vh;
pointer-event: none;
}
#image {
display: block;
width: auto;
height: auto;
pointer-event: none;
max-width: 100%;
max-height: 100vh;
margin: 0 auto;
object-fit: contain;
}
- type: image
style:
left: 50%
top: 50%
width: 100%
entity: sensor.lauras_pc_monitorpowerstate
state_image:
PowerOn: http://homeassistant.local:8123/local/dashboard/office/laura-pc-on.png
tap_action:
action: none
hold_action:
action: none
card_mod:
style:
hui-image $: |
.container {
width: 100%;
max-height: 100vh;
pointer-event: none;
}
#image {
display: block;
width: auto;
height: auto;
max-width: 100%;
pointer-event: none;
max-height: 100vh;
margin: 0 auto;
object-fit: contain;
}
- type: icon
style:
left: 70%
top: 30%
icon: mdi:alert-circle
tap_action:
action: navigate
navigation_path: '#aj-pc'
card_mod:
style:
hui-icon-element $: |
.type-icon {
display: block;
width: auto;
height: auto;
max-width: 100%;
max-height: 100vh;
margin: 0 auto;
object-fit: contain;
}
image:
media_content_id: http://homeassistant.local:8123/local/dashboard/office/office-off.png
media_content_type: ''
metadata:
navigateIds:
- {}
- media_content_type: ''
media_content_id: __MANUAL_ENTRY__
view_layout:
grid-area: desks
card_mod:
style:
hui-image $: |
.container {
width: 100%;
pointer-event: none;
max-height: 100vh;
}
#image {
display: block;
width: auto;
pointer-event: none;
height: auto;
max-width: 100%;
max-height: 100vh;
margin: 0 auto;
object-fit: contain;
}





