chore(dev): Improve .devcontainer

* replace weather.home usage with demo sensors
* add support for CDE forwarding (local proxy) + forward 5000 & 8123
* add extra ui graph with color_threshholds edge-case
This commit is contained in:
Jonas De Kegel
2022-11-13 14:52:51 +00:00
parent 8577f2fb59
commit c50ac9ddbc
3 changed files with 48 additions and 12 deletions

View File

@@ -5,6 +5,12 @@ lovelace:
type: module
default_config:
http: # support devcontainers/codespaces/gitpod
use_x_forwarded_for: true
trusted_proxies:
- 127.0.0.1
ip_ban_enabled: true
login_attempts_threshold: 5
demo:
@@ -38,3 +44,7 @@ sensor:
name: random_0_1000
minimum: 0
maximum: 1000
- platform: random
name: random_150_1000
minimum: 150
maximum: 1000

View File

@@ -31,5 +31,13 @@
"**/.hg/store/**": true,
"**/.rpt2_cache/**": true
}
}
},
"portsAttributes": {
"5000": {
"label": "rollup"
},
"8123": {
"label": "HA"
}
}
}

View File

@@ -3,19 +3,15 @@ views:
cards:
- type: custom:mini-graph-card
entities:
- sensor.humidity
- sensor.outside_humidity
- type: custom:mini-graph-card
entities:
- sensor.temperature
- type: custom:mini-graph-card
entities:
- sensor.pressure
- sensor.outside_temperature
show:
extrema: true
- type: custom:mini-graph-card
entities:
- entity: weather.home
attribute: pressure
- entity: sensor.outside_temperature
show:
extrema: true
- type: custom:mini-graph-card
@@ -48,17 +44,39 @@ views:
points: true
entities:
- entity: sensor.random_0_1000
name: log(0 - 1000) Gradients
name: log(150 - 1000) Gradients
aggregate_func: last
color_thresholds:
- value: 0
color: "#00ff00"
- value: 10
- value: 200
color: "#ffff00"
- value: 100
- value: 350
color: "#ff9900"
- value: 500
- value: 600
color: "#ff0000"
- type: custom:mini-graph-card
hours_to_show: 1
points_per_hour: 120
lower_bound: 0
upper_bound: 1000
# logarithmic: true
smoothing: false
height: 600
show:
extrema: true
# points: true
entities:
- entity: sensor.random_0_1000
name: log(150 - 1000) Simple
aggregate_func: last
color_thresholds:
- value: 0
color: green
- value: 200
color: red
- value: 1000
color: blue
- type: custom:mini-graph-card
entities:
- sensor.non_existant