diff --git a/basement-rack.yaml b/basement-rack.yaml new file mode 100644 index 0000000..311ea41 --- /dev/null +++ b/basement-rack.yaml @@ -0,0 +1,9 @@ +substitutions: + name: "basement-rack" + friendly_name: "Basement rack" + +esphome: + area: "Basement" + +packages: + device_base: !include templates/mystrom.yaml diff --git a/car-charger.yaml b/car-charger.yaml new file mode 100644 index 0000000..47771f9 --- /dev/null +++ b/car-charger.yaml @@ -0,0 +1,9 @@ +substitutions: + name: "car-charger" + friendly_name: "Car charger" + +esphome: + area: "Garage" + +packages: + device_base: !include templates/mystrom.yaml diff --git a/freezer.yaml b/freezer.yaml new file mode 100644 index 0000000..22e9908 --- /dev/null +++ b/freezer.yaml @@ -0,0 +1,9 @@ +substitutions: + name: "freezer" + friendly_name: "Freezer" + +esphome: + area: "Cellar" + +packages: + device_base: !include templates/mystrom.yaml diff --git a/living-room-entertainment.yaml b/living-room-entertainment.yaml new file mode 100644 index 0000000..5285e4b --- /dev/null +++ b/living-room-entertainment.yaml @@ -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 diff --git a/pool-pump.yaml b/outdoor-equipment.yaml similarity index 75% rename from pool-pump.yaml rename to outdoor-equipment.yaml index 35a9e91..6f34515 100644 --- a/pool-pump.yaml +++ b/outdoor-equipment.yaml @@ -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 diff --git a/recirculation-pump.yaml b/recirculation-pump.yaml index 1f3cbd4..66a7b78 100644 --- a/recirculation-pump.yaml +++ b/recirculation-pump.yaml @@ -1,8 +1,8 @@ substitutions: name: "recirculation-pump" + friendly_name: "Recirculation pump" esphome: - friendly_name: "Recirculation pump" area: "Workshop" packages: diff --git a/reflash.sh b/reflash.sh index b2b0f8a..cd18aa4 100755 --- a/reflash.sh +++ b/reflash.sh @@ -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() { diff --git a/storage-heater.yaml b/storage-heater.yaml index 4bbb233..b789f3a 100644 --- a/storage-heater.yaml +++ b/storage-heater.yaml @@ -1,8 +1,8 @@ substitutions: name: "storage-heater" + friendly_name: "Storage heater" esphome: - friendly_name: "Storage heater" area: "Storage" packages: diff --git a/templates/mystrom.yaml b/templates/mystrom.yaml index 2006acc..f89e613 100644 --- a/templates/mystrom.yaml +++ b/templates/mystrom.yaml @@ -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}" diff --git a/tools-power.yaml b/tools-power.yaml new file mode 100644 index 0000000..80ded00 --- /dev/null +++ b/tools-power.yaml @@ -0,0 +1,9 @@ +substitutions: + name: "tools-power" + friendly_name: "Tools power" + +esphome: + area: "Workshop" + +packages: + device_base: !include templates/mystrom.yaml