Initialize docker stack repo
This commit is contained in:
63
homeassistant/config/configuration.yaml
Normal file
63
homeassistant/config/configuration.yaml
Normal file
@@ -0,0 +1,63 @@
|
||||
# Loads default set of integrations. Do not remove.
|
||||
default_config:
|
||||
|
||||
# Load frontend themes from the themes folder
|
||||
frontend:
|
||||
themes: !include_dir_merge_named themes
|
||||
|
||||
automation: !include automations.yaml
|
||||
script: !include scripts.yaml
|
||||
scene: !include scenes.yaml
|
||||
|
||||
http:
|
||||
use_x_forwarded_for: true
|
||||
trusted_proxies:
|
||||
- 127.0.0.1
|
||||
- ::1
|
||||
- 10.8.0.0/24
|
||||
|
||||
template:
|
||||
- sensor:
|
||||
- name: "Network RX Mbit (wlp2s0)"
|
||||
unit_of_measurement: "Mbit/s"
|
||||
state: >
|
||||
{{ (states(sensor.localhost_wlp2s0_rx) | float * 8 / 1_000_000 ) | round(2) }}
|
||||
|
||||
- name: "Network TX Mbit (wlp2s0)"
|
||||
unit_of_measurement: "Mbit/s"
|
||||
state: >
|
||||
{{ (states(sensor.localhost_wlp2s0_tx) | float * 8 / 1_000_000 ) | round(2) }}
|
||||
|
||||
command_line:
|
||||
- sensor:
|
||||
name: "WireGuard wg0 status"
|
||||
command: >-
|
||||
ip link show wg0 | grep -q "LOWER_UP" && echo UP || echo DOWN
|
||||
scan_interval: 30
|
||||
- sensor:
|
||||
name: "Docker containers summary"
|
||||
command: "/config/docker_containers_summary.py"
|
||||
scan_interval: 60
|
||||
value_template: "{{ value_json.count }}"
|
||||
json_attributes:
|
||||
- list
|
||||
|
||||
rest:
|
||||
- resource: http://127.0.0.1:8099/status
|
||||
scan_interval: 60
|
||||
sensor:
|
||||
- name: "OpenClaw Gateway Reachable"
|
||||
value_template: "{{ value_json.gateway.reachable }}"
|
||||
- name: "OpenClaw Gateway Latency"
|
||||
unit_of_measurement: "ms"
|
||||
value_template: "{{ value_json.gateway.connectLatencyMs }}"
|
||||
- name: "OpenClaw Sessions"
|
||||
value_template: "{{ value_json.agents.totalSessions }}"
|
||||
- name: "OpenClaw Bootstrap Pending"
|
||||
value_template: "{{ value_json.agents.bootstrapPendingCount }}"
|
||||
- name: "OpenClaw Last Active Age"
|
||||
unit_of_measurement: "ms"
|
||||
value_template: "{{ value_json.agents.agents[0].lastActiveAgeMs }}"
|
||||
|
||||
shell_command:
|
||||
docker_restart: "curl --unix-socket /var/run/docker.sock -X POST http://localhost/containers/{{ container }}/restart"
|
||||
Reference in New Issue
Block a user