laundry esphome migration

This commit is contained in:
root
2025-05-30 23:45:16 +12:00
parent b09fb0625b
commit 8bb951dc8f
37 changed files with 3277 additions and 1630 deletions

View File

@@ -4,24 +4,30 @@
#############################################
sensor:
- platform: uptime # Uptime for this device in seconds
name: "Uptime (s): ${local_friendly_name}"
name: "Uptime (s):"
update_interval: ${local_update_interval}
id: uptime_sensor
entity_category: "diagnostic"
- platform: wifi_signal # Wifi Strength
name: "Wifi dB: ${local_friendly_name}"
name: "Wifi (dB):"
id: wifi_signal_db
update_interval: ${local_update_interval}
entity_category: "diagnostic"
- platform: copy # Reports the WiFi signal strength in %
source_id: wifi_signal_db
name: "WiFi Percent: ${local_friendly_name}"
name: "WiFi (%):"
filters:
- lambda: return min(max(2 * (x + 100.0), 0.0), 100.0);
unit_of_measurement: "% Max"
entity_category: "diagnostic"
device_class: ""
binary_sensor:
- platform: status
name: "Network Status"
icon: mdi:check-network-outline
entity_category: diagnostic
#############################################
# Text Sensors
# https://esphome.io/components/text_sensor/index.html
@@ -31,66 +37,88 @@ text_sensor:
# General ESPHome Info
######################################################
- platform: version
name: "Version: ${local_friendly_name}"
name: "Version:"
entity_category: "diagnostic"
- platform: wifi_info
ip_address:
name: "IP Address: ${local_friendly_name}"
icon: mdi:ip-network
entity_category: diagnostic
name: "IP Address:"
ssid:
name: "Connected SSID"
icon: mdi:wifi-strength-2
entity_category: diagnostic
mac_address:
name: "MAC Address:"
icon: mdi:network-pos
entity_category: diagnostic
- platform: uptime # Uptime for this device human readable
name: "Uptime: ${local_friendly_name}"
name: "Uptime:"
icon: mdi:clock-start
update_interval: ${local_update_interval}
entity_category: "diagnostic"
######################################################
# Creates a sensor showing when the device was last restarted
# Uptime template sensor, and SNTP are needed
######################################################
#- platform: template
# name: ${local_friendly_name} Last Restart
# id: device_last_restart
# icon: mdi:clock
# entity_category: diagnostic
# #device_class: timestamp
######################################################
# Creates a sensor of the uptime of the device, in formatted days, hours, minutes and seconds
######################################################
#- platform: template
# name: "Uptime"
# entity_category: diagnostic
# lambda: |-
# int seconds = (id(uptime_sensor).state);
# int days = seconds / (24 * 3600);
# seconds = seconds % (24 * 3600);
# int hours = seconds / 3600;
# seconds = seconds % 3600;
# int minutes = seconds / 60;
# seconds = seconds % 60;
# if ( days > 3650 ) {
# return { "Starting up" };
# } else if ( days ) {
# return { (String(days) +"d " + String(hours) +"h " + String(minutes) +"m "+ String(seconds) +"s").c_str() };
# } else if ( hours ) {
# return { (String(hours) +"h " + String(minutes) +"m "+ String(seconds) +"s").c_str() };
# } else if ( minutes ) {
# return { (String(minutes) +"m "+ String(seconds) +"s").c_str() };
# } else {
# return { (String(seconds) +"s").c_str() };
# }
# icon: mdi:clock-start
# - platform: template
# name: "Uptime (Days)"
# entity_category: diagnostic
# lambda: |-
# int seconds = (id(uptime_sensor).state);
# int days = seconds / (24 * 3600);
# seconds = seconds % (24 * 3600);
# int hours = seconds / 3600;
# seconds = seconds % 3600;
# int minutes = seconds / 60;
# seconds = seconds % 60;
# if ( days > 3650 ) {
# return "Starting up" ;
# } else if ( days ) {
# return (String(days) +"d " + String(hours) +"h " + String(minutes) +"m "+ String(seconds) +"s").c_str() ;
# } else if ( hours ) {
# return (String(hours) +"h " + String(minutes) +"m "+ String(seconds) +"s").c_str() ;
# } else if ( minutes ) {
# return (String(minutes) +"m "+ String(seconds) +"s").c_str() ;
# } else {
# return (String(seconds) +"s").c_str() ;
# }
# icon: mdi:clock-start
# - platform: template
# name: "Uptime (Days)"
# entity_category: diagnostic
# lambda: |-
# int seconds = (id(uptime_sensor).state);
# int days = seconds / (24 * 3600);
# seconds = seconds % (24 * 3600);
# int hours = seconds / 3600;
# seconds = seconds % 3600;
# int minutes = seconds / 60;
# seconds = seconds % 60;
# if ( days > 3650 ) {
# return { "Starting up" };
# } else if ( days ) {
# return { (String(days) +"d " + String(hours) +"h " + String(minutes) +"m "+ String(seconds) +"s").c_str() };
# } else if ( hours ) {
# return { (String(hours) +"h " + String(minutes) +"m "+ String(seconds) +"s").c_str() };
# } else if ( minutes ) {
# return { (String(minutes) +"m "+ String(seconds) +"s").c_str() };
# } else {
# return { (String(seconds) +"s").c_str() };
# }
# icon: mdi:clock-start
button:
- platform: safe_mode
name: "Safe Mode Restart: ${local_friendly_name}"
name: "Safe Mode Restart:"
entity_category: "diagnostic"
disabled_by_default: true
- platform: restart
name: "Restart: ${local_friendly_name}"
name: "Restart:"
entity_category: "diagnostic"
disabled_by_default: true
- platform: factory_reset
name: "FACTORY RESET: ${local_friendly_name}"
name: "FACTORY RESET:"
entity_category: "diagnostic"
disabled_by_default: true