From 1fe74cd8359a2a9c90d0bf2e4ee87b7c055743c3 Mon Sep 17 00:00:00 2001 From: Hamish Findlay Date: Mon, 3 Oct 2022 22:36:49 +0100 Subject: [PATCH] Enable forced discharging - fix switch --- custom_components/battery_sim/switch.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/custom_components/battery_sim/switch.py b/custom_components/battery_sim/switch.py index 3d76330..32f51d3 100644 --- a/custom_components/battery_sim/switch.py +++ b/custom_components/battery_sim/switch.py @@ -5,7 +5,7 @@ from homeassistant.components.switch import SwitchEntity -from .const import DOMAIN, CONF_BATTERY, OVERIDE_CHARGING, PAUSE_BATTERY +from .const import DOMAIN, CONF_BATTERY, OVERIDE_CHARGING, PAUSE_BATTERY, FORCE_DISCHARGE _LOGGER = logging.getLogger(__name__) @@ -19,6 +19,11 @@ "name": PAUSE_BATTERY, "key": "pause_battery_enabled", "icon": "mdi:pause", + }, + { + "name": FORCE_DISCHARGE, + "key": "force _battery_enabled", + "icon": "mdi:home-export-outline" } ]