mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-28 03:36:44 +00:00
Updated picture-elements demo card (#1501)
* Update floorplan image * Add image elements * Updated card to use different elements * Change light name * Light name * Updated path
This commit is contained in:
parent
bdf26bbccd
commit
af4df647cc
Binary file not shown.
Before Width: | Height: | Size: 78 KiB After Width: | Height: | Size: 76 KiB |
BIN
gallery/public/images/light_bulb_off.png
Normal file
BIN
gallery/public/images/light_bulb_off.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
BIN
gallery/public/images/light_bulb_on.png
Normal file
BIN
gallery/public/images/light_bulb_on.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 20 KiB |
@ -5,44 +5,50 @@ import '../components/demo-cards.js';
|
|||||||
|
|
||||||
const CONFIGS = [
|
const CONFIGS = [
|
||||||
{
|
{
|
||||||
heading: 'Basic card with icons',
|
heading: 'Card with few elements',
|
||||||
config: `
|
config: `
|
||||||
- type: picture-elements
|
- type: picture-elements
|
||||||
image: /images/floorplan.png
|
image: /images/floorplan.png
|
||||||
elements:
|
elements:
|
||||||
|
- type: service-button
|
||||||
|
title: Lights Off
|
||||||
|
style:
|
||||||
|
top: 97%
|
||||||
|
left: 90%
|
||||||
|
padding: 0px
|
||||||
|
service: light.turn_off
|
||||||
|
service_data:
|
||||||
|
entity_id: group.all_lights
|
||||||
- type: icon
|
- type: icon
|
||||||
icon: mdi:cctv
|
icon: mdi:cctv
|
||||||
entity: camera.porch
|
entity: camera.demo_camera
|
||||||
style:
|
style:
|
||||||
top: 92.5%
|
top: 12%
|
||||||
left: 16%
|
left: 6%
|
||||||
transform: rotate(235deg)
|
|
||||||
--iron-icon-height: 30px
|
|
||||||
--iron-icon-width: 30px
|
|
||||||
--iron-icon-stroke-color: black
|
|
||||||
--iron-icon-fill-color: rgba(50, 50, 50, .75)
|
|
||||||
- type: icon
|
|
||||||
icon: mdi:cctv
|
|
||||||
entity: camera.patio
|
|
||||||
style:
|
|
||||||
top: 4.5%
|
|
||||||
left: 16%
|
|
||||||
transform: rotate(-60deg) scaleX(-1)
|
transform: rotate(-60deg) scaleX(-1)
|
||||||
--iron-icon-height: 30px
|
--iron-icon-height: 30px
|
||||||
--iron-icon-width: 30px
|
--iron-icon-width: 30px
|
||||||
--iron-icon-stroke-color: black
|
--iron-icon-stroke-color: black
|
||||||
--iron-icon-fill-color: rgba(50, 50, 50, .75)
|
--iron-icon-fill-color: rgba(50, 50, 50, .75)
|
||||||
- type: icon
|
- type: image
|
||||||
icon: mdi:cctv
|
entity: light.bed_light
|
||||||
entity: camera.backyard
|
tap_action: toggle
|
||||||
|
image: /images/light_bulb_off.png
|
||||||
|
state_image:
|
||||||
|
'on': /images/light_bulb_on.png
|
||||||
|
state_filter:
|
||||||
|
'on': brightness(130%) saturate(1.5) drop-shadow(0px 0px 10px gold)
|
||||||
|
'off': brightness(80%) saturate(0.8)
|
||||||
style:
|
style:
|
||||||
top: 5%
|
top: 35%
|
||||||
left: 78%
|
left: 65%
|
||||||
transform: rotate(60deg)
|
width: 7%
|
||||||
--iron-icon-height: 30px
|
padding: 50px 50px 100px 50px
|
||||||
--iron-icon-width: 30px
|
- type: state-icon
|
||||||
--iron-icon-stroke-color: black
|
entity: binary_sensor.movement_backyard
|
||||||
--iron-icon-fill-color: rgba(50, 50, 50, .75)
|
style:
|
||||||
|
top: 8%
|
||||||
|
left: 35%
|
||||||
`
|
`
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user