diff --git a/athom-2ch-relay-board.yaml b/athom-2ch-relay-board.yaml index a96d8aa..9d471c2 100644 --- a/athom-2ch-relay-board.yaml +++ b/athom-2ch-relay-board.yaml @@ -4,7 +4,7 @@ substitutions: room: "" device_description: "athom esp32 2ch relay board" project_name: "Athom Technology.ESP32 2CH Relay Board" - project_version: "v2.0.2" + project_version: "v2.0.3" update_interval: 60s # Define a domain for this device to use. i.e. iot.home.lan (so device will appear as athom-smart-plug-v2.iot.home.lan in DNS/DHCP logs) dns_domain: "" @@ -28,6 +28,7 @@ substitutions: esphome: name: "${name}" friendly_name: "${friendly_name}" + comment: "${device_description}" area: "${room}" name_add_mac_suffix: true min_version: 2024.6.0 @@ -41,7 +42,8 @@ esp32: board: esp32dev flash_size: 4MB framework: - type: arduino + type: esp-idf + version: recommended preferences: flash_write_interval: 5min @@ -84,6 +86,15 @@ esp32_improv: dashboard_import: package_import_url: github://athom-tech/esp32-configs/athom-2ch-relay-board.yaml +# esp32_ble_tracker: +# scan_parameters: +# interval: 1100ms +# window: 1100ms +# active: true + +# bluetooth_proxy: +# active: true + remote_receiver: pin: GPIO17 dump: rc_switch @@ -134,8 +145,9 @@ sensor: - platform: uptime name: "Uptime Sensor" id: uptime_sensor + type: + timestamp entity_category: "diagnostic" - internal: true - platform: wifi_signal # Reports the WiFi signal strength/RSSI in dB name: "WiFi Signal dB" @@ -207,31 +219,6 @@ text_sensor: 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 - time: - platform: sntp id: sntp_time diff --git a/athom-4ch-relay-board.yaml b/athom-4ch-relay-board.yaml index 0993995..7daed7a 100644 --- a/athom-4ch-relay-board.yaml +++ b/athom-4ch-relay-board.yaml @@ -4,7 +4,7 @@ substitutions: room: "" device_description: "athom esp32 4ch relay board" project_name: "Athom Technology.ESP32 4CH Relay Board" - project_version: "v2.0.2" + project_version: "v2.0.3" update_interval: 60s # Define a domain for this device to use. i.e. iot.home.lan (so device will appear as athom-smart-plug-v2.iot.home.lan in DNS/DHCP logs) dns_domain: "" @@ -30,6 +30,7 @@ substitutions: esphome: name: "${name}" friendly_name: "${friendly_name}" + comment: "${device_description}" area: "${room}" name_add_mac_suffix: true min_version: 2024.6.0 @@ -43,7 +44,8 @@ esp32: board: esp32dev flash_size: 4MB framework: - type: arduino + type: esp-idf + version: recommended preferences: flash_write_interval: 5min @@ -86,6 +88,15 @@ esp32_improv: dashboard_import: package_import_url: github://athom-tech/esp32-configs/athom-4ch-relay-board.yaml +# esp32_ble_tracker: +# scan_parameters: +# interval: 1100ms +# window: 1100ms +# active: true + +# bluetooth_proxy: +# active: true + remote_receiver: pin: GPIO17 dump: rc_switch @@ -172,8 +183,9 @@ sensor: - platform: uptime name: "Uptime Sensor" id: uptime_sensor + type: + timestamp entity_category: "diagnostic" - internal: true - platform: wifi_signal # Reports the WiFi signal strength/RSSI in dB name: "WiFi Signal dB" @@ -257,31 +269,6 @@ text_sensor: 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 - time: - platform: sntp id: sntp_time diff --git a/athom-8ch-relay-board.yaml b/athom-8ch-relay-board.yaml index 0aee6b9..50097c6 100644 --- a/athom-8ch-relay-board.yaml +++ b/athom-8ch-relay-board.yaml @@ -4,7 +4,7 @@ substitutions: room: "" device_description: "athom esp32 8ch relay board" project_name: "Athom Technology.ESP32 8CH Relay Board" - project_version: "v2.0.2" + project_version: "v2.0.3" update_interval: 60s # Define a domain for this device to use. i.e. iot.home.lan (so device will appear as athom-smart-plug-v2.iot.home.lan in DNS/DHCP logs) dns_domain: "" @@ -34,6 +34,7 @@ substitutions: esphome: name: "${name}" friendly_name: "${friendly_name}" + comment: "${device_description}" area: "${room}" name_add_mac_suffix: true min_version: 2024.6.0 @@ -47,7 +48,8 @@ esp32: board: esp32dev flash_size: 4MB framework: - type: arduino + type: esp-idf + version: recommended preferences: flash_write_interval: 5min @@ -90,6 +92,15 @@ esp32_improv: dashboard_import: package_import_url: github://athom-tech/esp32-configs/athom-8ch-relay-board.yaml +# esp32_ble_tracker: +# scan_parameters: +# interval: 1100ms +# window: 1100ms +# active: true + +# bluetooth_proxy: +# active: true + remote_receiver: pin: GPIO17 dump: rc_switch @@ -247,8 +258,9 @@ sensor: - platform: uptime name: "Uptime Sensor" id: uptime_sensor + type: + timestamp entity_category: "diagnostic" - internal: true - platform: wifi_signal # Reports the WiFi signal strength/RSSI in dB name: "WiFi Signal dB" @@ -356,31 +368,6 @@ text_sensor: 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 - time: - platform: sntp id: sntp_time