diff --git a/demo/src/configs/sections/entities.ts b/demo/src/configs/sections/entities.ts index 4ce452b787..b1b50f04ee 100644 --- a/demo/src/configs/sections/entities.ts +++ b/demo/src/configs/sections/entities.ts @@ -111,6 +111,16 @@ export const demoEntitiesSections: DemoConfig["entities"] = (localize) => friendly_name: "Living room Temperature", }, }, + "sensor.living_room_humidity": { + entity_id: "sensor.living_room_humidity", + state: "57", + attributes: { + state_class: "measurement", + unit_of_measurement: "%", + device_class: "humidity", + friendly_name: "Living room Humidity", + }, + }, "sensor.outdoor_temperature": { entity_id: "sensor.outdoor_temperature", state: "10.5", @@ -189,6 +199,14 @@ export const demoEntitiesSections: DemoConfig["entities"] = (localize) => supported_features: 32, }, }, + "binary_sensor.kitchen_motion": { + entity_id: "light.kitchen_motion", + state: "on", + attributes: { + device_class: "motion", + friendly_name: "Kitchen motion", + }, + }, "light.worktop_spotlights": { entity_id: "light.worktop_spotlights", state: "off", @@ -423,6 +441,14 @@ export const demoEntitiesSections: DemoConfig["entities"] = (localize) => supported_features: 64063, }, }, + "switch.in_meeting": { + entity_id: "switch.in_meeting", + state: "on", + attributes: { + icon: "mdi:laptop-account", + friendly_name: "In a meeting", + }, + }, "sensor.standing_desk_height": { entity_id: "sensor.standing_desk_height", state: "72", diff --git a/demo/src/configs/sections/lovelace.ts b/demo/src/configs/sections/lovelace.ts index 5fa8597c6e..22c564ed72 100644 --- a/demo/src/configs/sections/lovelace.ts +++ b/demo/src/configs/sections/lovelace.ts @@ -30,12 +30,36 @@ export const demoLovelaceSections: DemoConfig["lovelace"] = (localize) => ({ ? [] : [ { - title: `${localize("ui.panel.page-demo.config.sections.titles.welcome")} 👋`, - cards: [{ type: "custom:ha-demo-card" }], + cards: [ + { + type: "heading", + heading: `${localize("ui.panel.page-demo.config.sections.titles.welcome")} 👋`, + }, + { type: "custom:ha-demo-card" }, + ], }, ]), { cards: [ + { + type: "heading", + heading: localize( + "ui.panel.page-demo.config.sections.titles.living_room" + ), + icon: "mdi:sofa", + badges: [ + { + type: "entity", + entity: "sensor.living_room_temperature", + color: "red", + }, + { + type: "entity", + entity: "sensor.living_room_humidity", + color: "indigo", + }, + ], + }, { type: "tile", entity: "light.floor_lamp", @@ -54,13 +78,6 @@ export const demoLovelaceSections: DemoConfig["lovelace"] = (localize) => ({ type: "tile", entity: "light.bar_lamp", }, - { - graph: "line", - type: "sensor", - entity: "sensor.living_room_temperature", - detail: 1, - name: "Temperature", - }, { type: "tile", entity: "cover.living_room_garden_shutter", @@ -71,11 +88,25 @@ export const demoLovelaceSections: DemoConfig["lovelace"] = (localize) => ({ entity: "media_player.living_room_nest_mini", }, ], - title: `🛋️ ${localize("ui.panel.page-demo.config.sections.titles.living_room")} `, }, { type: "grid", cards: [ + { + type: "heading", + heading: localize( + "ui.panel.page-demo.config.sections.titles.kitchen" + ), + icon: "mdi:fridge", + badges: [ + { + type: "entity", + entity: "binary_sensor.kitchen_motion", + show_state: false, + color: "blue", + }, + ], + }, { type: "tile", entity: "cover.kitchen_shutter", @@ -106,11 +137,17 @@ export const demoLovelaceSections: DemoConfig["lovelace"] = (localize) => ({ entity: "media_player.kitchen_nest_audio", }, ], - title: `👩‍🍳 ${localize("ui.panel.page-demo.config.sections.titles.kitchen")}`, }, { type: "grid", cards: [ + { + type: "heading", + heading: localize( + "ui.panel.page-demo.config.sections.titles.energy" + ), + icon: "mdi:transmission-tower", + }, { type: "tile", entity: "binary_sensor.tesla_wall_connector_vehicle_connected", @@ -148,11 +185,17 @@ export const demoLovelaceSections: DemoConfig["lovelace"] = (localize) => ({ color: "dark-grey", }, ], - title: `⚡️ ${localize("ui.panel.page-demo.config.sections.titles.energy")}`, }, { type: "grid", cards: [ + { + type: "heading", + heading: localize( + "ui.panel.page-demo.config.sections.titles.climate" + ), + icon: "mdi:thermometer", + }, { type: "tile", entity: "sun.sun", @@ -185,16 +228,38 @@ export const demoLovelaceSections: DemoConfig["lovelace"] = (localize) => ({ state_content: ["preset_mode", "current_temperature"], }, ], - title: `🌤️ ${localize("ui.panel.page-demo.config.sections.titles.climate")}`, }, { type: "grid", cards: [ + { + type: "heading", + heading: localize( + "ui.panel.page-demo.config.sections.titles.study" + ), + icon: "mdi:desk-lamp", + badges: [ + { + type: "entity", + entity: "switch.in_meeting", + state: "on", + state_content: "name", + visibility: [ + { + condition: "state", + state: "on", + entity: "switch.in_meeting", + }, + ], + }, + ], + }, { type: "tile", entity: "cover.study_shutter", name: "Shutter", }, + { type: "tile", entity: "light.study_spotlights", @@ -211,12 +276,23 @@ export const demoLovelaceSections: DemoConfig["lovelace"] = (localize) => ({ color: "brown", icon: "mdi:desk", }, + { + type: "tile", + entity: "switch.in_meeting", + name: "Meeting mode", + }, ], - title: `🧑‍💻 ${localize("ui.panel.page-demo.config.sections.titles.study")}`, }, { type: "grid", cards: [ + { + type: "heading", + heading: localize( + "ui.panel.page-demo.config.sections.titles.outdoor" + ), + icon: "mdi:tree", + }, { type: "tile", entity: "light.outdoor_light", @@ -246,11 +322,17 @@ export const demoLovelaceSections: DemoConfig["lovelace"] = (localize) => ({ name: "Illuminance", }, ], - title: `🌳 ${localize("ui.panel.page-demo.config.sections.titles.outdoor")}`, }, { type: "grid", cards: [ + { + type: "heading", + heading: localize( + "ui.panel.page-demo.config.sections.titles.updates" + ), + icon: "mdi:update", + }, { type: "tile", entity: "automation.home_assistant_auto_update", @@ -276,7 +358,6 @@ export const demoLovelaceSections: DemoConfig["lovelace"] = (localize) => ({ icon: "mdi:home-assistant", }, ], - title: `🎉 ${localize("ui.panel.page-demo.config.sections.titles.updates")}`, }, ], },