home-assistant: Manage YAML files with ConfigMap
Editing `configuration.yaml` et al. using `vi` via `kubectl exec` is rather tedious, since the version of `vi` in the *home-assistant* container image is very rudimentary. Thus, I think it would be better to use a ConfigMap to store the manually-edited YAML files, so I can edit them with my regular editor on my desktop. For this to work, the ConfigMap has to be mounted as a directory rather than as individual files (using `subPath`), as otherwise the pod would have to be restarted every time one of the files is updated.
This commit is contained in:
289
home-assistant/configuration.yaml
Normal file
289
home-assistant/configuration.yaml
Normal file
@@ -0,0 +1,289 @@
|
||||
assist_pipeline:
|
||||
config:
|
||||
counter:
|
||||
energy:
|
||||
frontend:
|
||||
history:
|
||||
image:
|
||||
input_boolean:
|
||||
input_button:
|
||||
input_datetime:
|
||||
input_number:
|
||||
input_select:
|
||||
input_text:
|
||||
logbook:
|
||||
map:
|
||||
media_source:
|
||||
mobile_app:
|
||||
person:
|
||||
schedule:
|
||||
ssdp:
|
||||
stream:
|
||||
sun:
|
||||
system_health:
|
||||
tag:
|
||||
timer:
|
||||
webhook:
|
||||
zeroconf:
|
||||
zone:
|
||||
|
||||
http:
|
||||
trusted_proxies:
|
||||
- 172.30.0.160/28
|
||||
use_x_forwarded_for: true
|
||||
|
||||
recorder:
|
||||
db_url: !env_var RECORDER_DB_URL
|
||||
db_max_retries: 100
|
||||
purge_keep_days: 366
|
||||
commit_interval: 0
|
||||
|
||||
homeassistant:
|
||||
whitelist_external_dirs:
|
||||
- /config
|
||||
- /tmp
|
||||
|
||||
logger:
|
||||
default: info
|
||||
|
||||
tts:
|
||||
- platform: picotts
|
||||
|
||||
group: !include groups.yaml
|
||||
automation: !include automations.yaml
|
||||
script: !include scripts.yaml
|
||||
scene: !include scenes.yaml
|
||||
shell_command: !include /run/config/shell-command.yaml
|
||||
|
||||
lovelace:
|
||||
mode: storage
|
||||
#dashboards: !include dashboards.yaml
|
||||
|
||||
#mqtt: !include mqtt.yaml
|
||||
|
||||
light:
|
||||
- platform: group
|
||||
name: Basement Lights
|
||||
entities:
|
||||
- light.desk_lamp_1
|
||||
- light.desk_lamp_2
|
||||
- light.desk_lamp_3
|
||||
- light.light_2
|
||||
- light.light_3
|
||||
- light.light_4
|
||||
- light.light_5
|
||||
- light.light_6
|
||||
- light.light_7
|
||||
|
||||
matrix:
|
||||
homeserver: https://hatch.chat
|
||||
username: '@homeassistant:hatch.chat'
|
||||
password: !secret matrix_password
|
||||
rooms:
|
||||
- '!DdgnpVhlRqeTeNqSEM:hatch.chat'
|
||||
- '!oyDXJxjUeJkEFshmAn:hatch.chat'
|
||||
commands:
|
||||
- word: snapshot
|
||||
name: snapshot
|
||||
- word: bunnies
|
||||
name: bunnies
|
||||
- expression: 'lights (?P<scene>.*)'
|
||||
name: lights
|
||||
|
||||
notify:
|
||||
- platform: matrix
|
||||
name: matrix
|
||||
default_room: '!DdgnpVhlRqeTeNqSEM:hatch.chat'
|
||||
- platform: group
|
||||
name: mobile_apps_group
|
||||
services:
|
||||
- service: mobile_app_pixel_5
|
||||
- service: mobile_app_pixel_6a
|
||||
- name: ntfy
|
||||
platform: rest
|
||||
method: POST_JSON
|
||||
target_param_name: topic
|
||||
title_param_name: title
|
||||
message_param_name: message
|
||||
resource: https://ntfy.pyrocufflink.net
|
||||
- name: ntfy2
|
||||
platform: ntfy
|
||||
url: https://ntfy.pyrocufflink.net
|
||||
default_topic: homeassistant
|
||||
|
||||
sensor:
|
||||
- name: Rain last 24 hours
|
||||
platform: statistics
|
||||
entity_id: sensor.rain_gauge
|
||||
unique_id: sensor.rain_last_24_hours
|
||||
state_characteristic: change
|
||||
max_age:
|
||||
hours: 24
|
||||
|
||||
template:
|
||||
- sensor:
|
||||
- name: 'Thermostat Temperature'
|
||||
device_class: temperature
|
||||
unit_of_measurement: °C
|
||||
state: >-
|
||||
{% if is_state('sensor.season', 'winter') %}
|
||||
{{ states('sensor.living_room_temperature') }}
|
||||
{% else %}
|
||||
{{ states('sensor.bedroom_temperature') }}
|
||||
{% endif %}
|
||||
|
||||
- name: "Tonight's Forecast"
|
||||
device_class: temperature
|
||||
unit_of_measurement: °C
|
||||
state: >-
|
||||
{{ state_attr('weather.kojc_daynight', 'forecast')
|
||||
| rejectattr('is_daytime')
|
||||
| map(attribute='temperature')
|
||||
| first }}
|
||||
|
||||
- name: Cost per Mow
|
||||
device_class: monetary
|
||||
unit_of_measurement: USD
|
||||
state: >-
|
||||
{{ 3072.21 / states('counter.mow_count')|int }}
|
||||
|
||||
- name: Apc1500 Load
|
||||
device_class: power
|
||||
unit_of_measurement: W
|
||||
state: >-
|
||||
{{ "%.1f" | format(
|
||||
states('sensor.apc1500_load') | float / 100
|
||||
* states('sensor.apc1500_nominal_real_power') | float
|
||||
)
|
||||
}}
|
||||
|
||||
- name: Apc1300 Load
|
||||
device_class: power
|
||||
unit_of_measurement: W
|
||||
state: >-
|
||||
{{ "%.1f" | format(
|
||||
states('sensor.apc1300_load') | float / 100
|
||||
* states('sensor.apc1300_nominal_real_power') | float
|
||||
)
|
||||
}}
|
||||
|
||||
cover:
|
||||
- platform: template
|
||||
covers:
|
||||
garage_door_1:
|
||||
device_class: garage
|
||||
friendly_name: "Garage Door 1"
|
||||
value_template: >-
|
||||
{% if is_state('binary_sensor.garage_door_1_window_door_is_open', 'on') %}
|
||||
open
|
||||
{% else %}
|
||||
closed
|
||||
{% endif %}
|
||||
open_cover:
|
||||
service: switch.turn_on
|
||||
target:
|
||||
entity_id: switch.garage_door_relay_3
|
||||
close_cover:
|
||||
service: switch.turn_on
|
||||
target:
|
||||
entity_id: switch.garage_door_relay_3
|
||||
icon_template: >-
|
||||
{% if is_state('binary_sensor.garage_door_1_window_door_is_open', 'on') %}
|
||||
mdi:garage-open
|
||||
{% else %}
|
||||
mdi:garage
|
||||
{% endif %}
|
||||
|
||||
- platform: template
|
||||
covers:
|
||||
garage_door_2:
|
||||
device_class: garage
|
||||
friendly_name: "Garage Door 2"
|
||||
value_template: >-
|
||||
{% if is_state('binary_sensor.garage_door_2_window_door_is_open', 'on') %}
|
||||
open
|
||||
{% else %}
|
||||
closed
|
||||
{% endif %}
|
||||
open_cover:
|
||||
service: switch.turn_on
|
||||
target:
|
||||
entity_id: switch.garage_door_relay_2_2
|
||||
close_cover:
|
||||
service: switch.turn_on
|
||||
target:
|
||||
entity_id: switch.garage_door_relay_2_2
|
||||
icon_template: >-
|
||||
{% if is_state('binary_sensor.garage_door_2_window_door_is_open', 'on') %}
|
||||
mdi:garage-open
|
||||
{% else %}
|
||||
mdi:garage
|
||||
{% endif %}
|
||||
|
||||
- platform: template
|
||||
covers:
|
||||
garage_door_3:
|
||||
device_class: garage
|
||||
friendly_name: "Garage Door 3"
|
||||
value_template: >-
|
||||
{% if is_state('binary_sensor.garage_door_3_window_door_is_open', 'on') %}
|
||||
open
|
||||
{% else %}
|
||||
closed
|
||||
{% endif %}
|
||||
open_cover:
|
||||
service: switch.turn_on
|
||||
target:
|
||||
entity_id: switch.garage_door_relay_2
|
||||
close_cover:
|
||||
service: switch.turn_on
|
||||
target:
|
||||
entity_id: switch.garage_door_relay_2
|
||||
icon_template: >-
|
||||
{% if is_state('binary_sensor.garage_door_3_window_door_is_open', 'on') %}
|
||||
mdi:garage-open
|
||||
{% else %}
|
||||
mdi:garage
|
||||
{% endif %}
|
||||
|
||||
switch:
|
||||
- platform: wake_on_lan
|
||||
name: Rosalina
|
||||
host: rosalina.pyrocufflink.blue
|
||||
mac: 0c:9d:92:0e:3a:41
|
||||
- platform: wake_on_lan
|
||||
name: vmhost0
|
||||
host: vmhost0.pyrocufflink.blue
|
||||
mac: e0:d5:5e:a2:2e:1a
|
||||
- platform: wake_on_lan
|
||||
name: vmhost1
|
||||
host: vmhost1.pyrocufflink.blue
|
||||
mac: 18:c0:4d:90:4d:00
|
||||
- platform: wake_on_lan
|
||||
name: Toad
|
||||
host: toad.pyrocufflink.blue
|
||||
mac: 1c:1b:0d:0f:ad:df
|
||||
- platform: wake_on_lan
|
||||
name: Sonic
|
||||
host: sonic.pyrocufflink.blue
|
||||
mac: e0:d5:5e:6e:ad:ac
|
||||
broadcast_address: 172.30.0.63
|
||||
|
||||
binary_sensor:
|
||||
- platform: template
|
||||
sensors:
|
||||
roomba_is_downstairs:
|
||||
friendly_name: Roomba is Downstairs
|
||||
value_template: >-
|
||||
{% if is_state('binary_sensor.roomba_ibeacon_ble_presence', 'on') and
|
||||
states('sensor.roomba_ibeacon_ble_rssi') | float > -70 %}
|
||||
on
|
||||
{% else %}
|
||||
off
|
||||
{% endif %}
|
||||
|
||||
prometheus:
|
||||
filter:
|
||||
exclude_entity_globs:
|
||||
- binary_sensor.node_14*
|
||||
- binary_sensor.node_15*
|
||||
Reference in New Issue
Block a user