Give each mystrom a separate file

This allows to set friendly_name (required for default
entity) and make an area suggestion, while also simplifying
reflash.sh script.
This commit is contained in:
2024-01-25 19:36:32 +01:00
parent 6d6a2a269e
commit 0acd5c7d72
10 changed files with 75 additions and 33 deletions
+9
View File
@@ -0,0 +1,9 @@
substitutions:
name: "basement-rack"
friendly_name: "Basement rack"
esphome:
area: "Basement"
packages:
device_base: !include templates/mystrom.yaml
+9
View File
@@ -0,0 +1,9 @@
substitutions:
name: "car-charger"
friendly_name: "Car charger"
esphome:
area: "Garage"
packages:
device_base: !include templates/mystrom.yaml
+9
View File
@@ -0,0 +1,9 @@
substitutions:
name: "freezer"
friendly_name: "Freezer"
esphome:
area: "Cellar"
packages:
device_base: !include templates/mystrom.yaml
+9
View File
@@ -0,0 +1,9 @@
substitutions:
name: "living-room-entertainment"
friendly_name: "Living room entertainment"
esphome:
area: "Living room"
packages:
device_base: !include templates/mystrom.yaml
+4 -2
View File
@@ -1,8 +1,8 @@
substitutions:
name: "pool-pump"
name: "outdoor-equipment"
friendly_name: "Outdoor equipment"
esphome:
friendly_name: "Pool pump"
area: "Backyard"
packages:
@@ -14,10 +14,12 @@ time:
- hours: 15
minutes: 35
seconds: 0
months: APR-OCT
then:
- switch.turn_on: mystrom_relay
- hours: 21
minutes: 55
seconds: 0
months: APR-OCT
then:
- switch.turn_off: mystrom_relay
+1 -1
View File
@@ -1,8 +1,8 @@
substitutions:
name: "recirculation-pump"
friendly_name: "Recirculation pump"
esphome:
friendly_name: "Recirculation pump"
area: "Workshop"
packages:
+21 -28
View File
@@ -18,16 +18,27 @@ else
command="run --no-logs"
fi
flash=(
"${command?} bathroomheater.yaml"
"${command?} blinds.yaml"
"${command?} heating.yaml"
"${command?} loud-siren.yaml"
"${command?} ruuvi.yaml"
"${command?} watermeter.yaml"
"${command?} heating-eg.yaml"
"${command?} heating-og.yaml"
)
declare -a flash
for config in \
bathroomheater.yaml \
blinds.yaml \
heating.yaml \
loud-siren.yaml \
ruuvi.yaml \
watermeter.yaml \
heating-eg.yaml \
heating-og.yaml \
car-charger.yaml \
freezer.yaml \
living-room-entertainment.yaml \
outdoor-equipment.yaml \
recirculation-pump.yaml \
storage-heater.yaml \
basement-rack.yaml \
tools-power.yaml; do
flash+=("${command?} ${config?}")
done
for btproxy_replica in \
c25bac
@@ -35,24 +46,6 @@ do
flash+=("${command?} btproxy.yaml --device btproxy-${btproxy_replica?}")
done
for mystrom_appliance in \
car-charger \
freezer \
living-room-entertainment \
outdoor-deer \
pool-pump \
recirculation-pump \
storage-heater \
tools-power
do
custom_file="${mystrom_appliance?}.yaml"
if [ -f "${custom_file?}" ]; then
flash+=("${command?} ${custom_file?}")
else
flash+=("-s name ${mystrom_appliance?} ${command?} templates/mystrom.yaml")
fi
done
declare -A flash_result
print_results_table() {
+1 -1
View File
@@ -1,8 +1,8 @@
substitutions:
name: "storage-heater"
friendly_name: "Storage heater"
esphome:
friendly_name: "Storage heater"
area: "Storage"
packages:
+3 -1
View File
@@ -1,10 +1,12 @@
substitutions:
# Change this via CLI with:
# $ esphome -s name tools run mystrom.yaml
# $ esphome -s name tools -s friendly_name Tools run mystrom.yaml
name: "spare-power-meter"
friendly_name: "Spare power meter"
esphome:
name: "${name}"
friendly_name: "${friendly_name}"
project:
name: "dasfoo.${name}"
+9
View File
@@ -0,0 +1,9 @@
substitutions:
name: "tools-power"
friendly_name: "Tools power"
esphome:
area: "Workshop"
packages:
device_base: !include templates/mystrom.yaml