Add friendly_name to make HA folks happy

This commit is contained in:
2025-05-09 21:01:58 +02:00
parent f552ea0f97
commit 9cc69d7ad2
70 changed files with 516 additions and 266 deletions

View File

@@ -1,6 +1,5 @@
substitutions:
device: socket-01
device_id: socket_01
name: Socket 01
area: Bedroom
comment: "${area} | TV Socket"
@@ -9,6 +8,7 @@ substitutions:
esphome:
name: mcu-${device}
friendly_name: ${name}
area: ${area}
comment: ${comment}
@@ -36,7 +36,7 @@ binary_sensor:
number: GPIO13
mode: INPUT_PULLUP
inverted: yes
name: "${name} Button"
name: Button
# filters:
# invert:
on_press:
@@ -65,11 +65,11 @@ output:
light:
- platform: binary
name: "${name} Red LED"
name: Red LED
id: light_red
output: led_red
- platform: binary
name: "${name} Blue LED"
name: Blue LED
id: light_blue
output: led_blue
@@ -83,21 +83,21 @@ sensor:
current_resistor: ${current_res}
voltage_divider: ${voltage_div}
current:
name: "${name} Current"
name: Current
icon: mdi:flash-circle
accuracy_decimals: 3
voltage:
name: "${name} Voltage"
name: Voltage
icon: mdi:current-ac
power:
name: "${name} Power"
id: "${device_id}_power"
name: Power
id: power
icon: mdi:flash-outline
update_interval: 30s
change_mode_every: 4
- platform: total_daily_energy
name: "${name} Total Daily Power"
power_id: "${device_id}_power"
name: Total Daily Power"
power_id: power
filters:
# Multiplication factor from W to kW is 0.001
- multiply: 0.001
@@ -106,7 +106,7 @@ sensor:
switch:
- platform: gpio
name: "${name} Relay"
name: Relay
# icon: mdi:power-socket-eu
pin: GPIO15
id: relay