Add MOS gate control via select entity

Adds a Select entity with four options (Normal / Charge Disabled /
Discharge Disabled / Both Disabled) that sends the 0xE1 write command
to the BMS and immediately refreshes sensor state.  Current option is
derived from the mos_charge_enabled / mos_discharge_enabled bits
already parsed on every poll.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-11 20:46:10 +02:00
parent b6c3e597f7
commit b52b25973e
5 changed files with 141 additions and 1 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ from homeassistant.core import HomeAssistant
from .const import CONF_ADDRESS, CONF_POLL_INTERVAL, DEFAULT_POLL_INTERVAL, DOMAIN
from .coordinator import BmsCoordinator
PLATFORMS = ["sensor", "binary_sensor", "number"]
PLATFORMS = ["sensor", "binary_sensor", "number", "select"]
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: