Improve gallery hui-gauge-card (#7682)

This commit is contained in:
Philip Allgaier 2020-11-17 15:46:33 +01:00 committed by GitHub
parent 530f494df8
commit 7c492338a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,6 +7,8 @@ import "../components/demo-cards";
const ENTITIES = [ const ENTITIES = [
getEntity("sensor", "brightness", "12", {}), getEntity("sensor", "brightness", "12", {}),
getEntity("sensor", "brightness_medium", "53", {}),
getEntity("sensor", "brightness_high", "87", {}),
getEntity("plant", "bonsai", "ok", {}), getEntity("plant", "bonsai", "ok", {}),
getEntity("sensor", "not_working", "unavailable", {}), getEntity("sensor", "not_working", "unavailable", {}),
getEntity("sensor", "outside_humidity", "54", { getEntity("sensor", "outside_humidity", "54", {
@ -21,16 +23,10 @@ const CONFIGS = [
{ {
heading: "Basic example", heading: "Basic example",
config: ` config: `
- type: gauge
entity: sensor.brightness
`,
},
{
heading: "With title",
config: `
- type: gauge - type: gauge
title: Humidity title: Humidity
entity: sensor.outside_humidity entity: sensor.outside_humidity
name: Outside Humidity
`, `,
}, },
{ {
@ -39,6 +35,7 @@ const CONFIGS = [
- type: gauge - type: gauge
entity: sensor.outside_temperature entity: sensor.outside_temperature
unit_of_measurement: C unit_of_measurement: C
name: Outside Temperature
`, `,
}, },
{ {
@ -46,19 +43,45 @@ const CONFIGS = [
config: ` config: `
- type: gauge - type: gauge
entity: sensor.brightness entity: sensor.brightness
name: Brightness Low
severity: severity:
red: 32 red: 75
green: 0 green: 0
yellow: 23 yellow: 50
`, `,
}, },
{ {
heading: "Setting Min and Max Values", heading: "Setting Severity Levels",
config: `
- type: gauge
entity: sensor.brightness_medium
name: Brightness Medium
severity:
red: 75
green: 0
yellow: 50
`,
},
{
heading: "Setting Severity Levels",
config: `
- type: gauge
entity: sensor.brightness_high
name: Brightness High
severity:
red: 75
green: 0
yellow: 50
`,
},
{
heading: "Setting Min (0) and Max (15) Values",
config: ` config: `
- type: gauge - type: gauge
entity: sensor.brightness entity: sensor.brightness
name: Brightness
min: 0 min: 0
max: 38 max: 15
`, `,
}, },
{ {