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-03
device_id: socket_03
name: Socket 03
area: Bedroom
comment: "${area} | SPARE Socket"
@@ -16,6 +15,7 @@ substitutions:
esphome:
name: mcu-${device}
friendly_name: ${name}
area: ${area}
comment: ${comment}
esp8266:
@@ -42,7 +42,7 @@ binary_sensor:
number: GPIO13
mode: INPUT_PULLUP
inverted: yes
name: "${name} Button"
name: Button
# filters:
# invert:
on_press:
@@ -72,11 +72,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
@@ -90,15 +90,15 @@ 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
on_value_range:
- above: ${max_power}
@@ -112,14 +112,14 @@ sensor:
data_template:
message: Switch turned off because power exceeded ${max_power} W
energy:
name: "${name} Energy"
name: Energy
unit_of_measurement: "Wh"
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
accuracy_decimals: 5
filters:
# Multiplication factor from W to kW is 0.001
@@ -129,7 +129,7 @@ sensor:
switch:
- platform: gpio
name: "${name} Relay"
name: Relay
# icon: mdi:power-socket-eu
pin: GPIO15
id: relay