From 128388f0acb599c4006226bf4a087bc4a0dd6665 Mon Sep 17 00:00:00 2001 From: Joshua King Date: Mon, 16 Feb 2026 20:52:33 -0500 Subject: [PATCH] updates --- esphome/ha-remote/ha-remote-1.base.yaml | 58 ------------------------- 1 file changed, 58 deletions(-) diff --git a/esphome/ha-remote/ha-remote-1.base.yaml b/esphome/ha-remote/ha-remote-1.base.yaml index 4b420cd..e65654b 100644 --- a/esphome/ha-remote/ha-remote-1.base.yaml +++ b/esphome/ha-remote/ha-remote-1.base.yaml @@ -49,14 +49,6 @@ globals: type: uint32_t restore_value: no initial_value: '0' - - id: last_battery_level_pct - type: float - restore_value: no - initial_value: '-1.0' - - id: battery_charging_inferred - type: bool - restore_value: no - initial_value: 'false' interval: - interval: 1s @@ -158,53 +150,3 @@ sensor: device_class: battery state_class: measurement accuracy_decimals: 0 - on_value: - then: - - lambda: |- - const float pct = x; - const bool valid = pct >= 0.0f && pct <= 100.0f; - - // Infer charging from SOC trend when no dedicated charge-detect pin exists. - if (valid) { - if (id(last_battery_level_pct) >= 0.0f) { - if (pct > id(last_battery_level_pct) + 0.2f) { - id(battery_charging_inferred) = true; - } else if (pct < id(last_battery_level_pct) - 0.2f) { - id(battery_charging_inferred) = false; - } - } - id(last_battery_level_pct) = pct; - } - - const char *icon = "\U000F0091"; // mdi:battery-unknown - if (!valid) { - icon = "\U000F0091"; // mdi:battery-unknown - } else if (pct >= 99.0f) { - icon = "\U000F0079"; // mdi:battery (full) - } else if (id(battery_charging_inferred)) { - if (pct < 40.0f) { - icon = "\U000F12A4"; // mdi:battery-charging-low - } else if (pct < 80.0f) { - icon = "\U000F12A5"; // mdi:battery-charging-medium - } else { - icon = "\U000F12A6"; // mdi:battery-charging-high - } - } else { - if (pct < 15.0f) { - icon = "\U000F10CD"; // mdi:battery-alert-variant-outline - } else if (pct < 40.0f) { - icon = "\U000F12A1"; // mdi:battery-low - } else if (pct < 80.0f) { - icon = "\U000F12A2"; // mdi:battery-medium - } else { - icon = "\U000F12A3"; // mdi:battery-high - } - } - - lv_label_set_text(id(nav_battery_icon_home), icon); - lv_label_set_text(id(nav_battery_icon_living_room), icon); - lv_label_set_text(id(nav_battery_icon_kitchen), icon); - lv_label_set_text(id(nav_battery_icon_upstairs), icon); - lv_label_set_text(id(nav_battery_icon_office), icon); - lv_label_set_text(id(nav_battery_icon_garage), icon); - lv_label_set_text(id(nav_battery_icon_outside), icon);