Add badges to section demo (#22029)
parent
b7763882f4
commit
dc6f1efffb
|
@ -111,9 +111,37 @@ export const demoEntitiesSections: DemoConfig["entities"] = (localize) =>
|
||||||
friendly_name: "Living room Temperature",
|
friendly_name: "Living room Temperature",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
"sensor.outdoor_temperature": {
|
||||||
|
entity_id: "sensor.outdoor_temperature",
|
||||||
|
state: "10.5",
|
||||||
|
attributes: {
|
||||||
|
state_class: "measurement",
|
||||||
|
unit_of_measurement: "°C",
|
||||||
|
device_class: "temperature",
|
||||||
|
friendly_name: "Outdoor temperature",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"sensor.outdoor_humidity": {
|
||||||
|
entity_id: "sensor.outdoor_humidity",
|
||||||
|
state: "70.4",
|
||||||
|
attributes: {
|
||||||
|
state_class: "measurement",
|
||||||
|
unit_of_measurement: "%",
|
||||||
|
device_class: "humidity",
|
||||||
|
friendly_name: "Outdoor humidity",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"device_tracker.car": {
|
||||||
|
entity_id: "sensor.outdoor_humidity",
|
||||||
|
state: "not_home",
|
||||||
|
attributes: {
|
||||||
|
friendly_name: "Car",
|
||||||
|
icon: "mdi:car",
|
||||||
|
},
|
||||||
|
},
|
||||||
"media_player.living_room_nest_mini": {
|
"media_player.living_room_nest_mini": {
|
||||||
entity_id: "media_player.living_room_nest_mini",
|
entity_id: "media_player.living_room_nest_mini",
|
||||||
state: "on",
|
state: "playing",
|
||||||
attributes: {
|
attributes: {
|
||||||
device_class: "speaker",
|
device_class: "speaker",
|
||||||
volume_level: 0.18,
|
volume_level: 0.18,
|
||||||
|
|
|
@ -9,6 +9,22 @@ export const demoLovelaceSections: DemoConfig["lovelace"] = (localize) => ({
|
||||||
title: isFrontpageEmbed ? "Home Assistant" : "Demo",
|
title: isFrontpageEmbed ? "Home Assistant" : "Demo",
|
||||||
path: "home",
|
path: "home",
|
||||||
icon: "mdi:home-assistant",
|
icon: "mdi:home-assistant",
|
||||||
|
badges: [
|
||||||
|
{
|
||||||
|
type: "entity",
|
||||||
|
entity: "sensor.outdoor_temperature",
|
||||||
|
color: "red",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: "entity",
|
||||||
|
entity: "sensor.outdoor_humidity",
|
||||||
|
color: "indigo",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: "entity",
|
||||||
|
entity: "device_tracker.car",
|
||||||
|
},
|
||||||
|
],
|
||||||
sections: [
|
sections: [
|
||||||
...(isFrontpageEmbed
|
...(isFrontpageEmbed
|
||||||
? []
|
? []
|
||||||
|
|
Loading…
Reference in New Issue