Full protocol coverage: binary sensors, energy, hardware version
Sensors added: - energy_stored (kWh = V × Ah / 1000) for energy dashboard Binary sensors added (all from existing 0x03 frame, no extra BLE requests): - Charge MOSFET / Discharge MOSFET (MOS gate status) - Cell Balancing (any balance bit active) - 13× protection flags: cell/pack over/under-voltage, charge/discharge over/under-temperature, charge/discharge over-current, short circuit, frontend IC error, software lock Other: - Hardware version string fetched once via CMD 0x05, shown in device card - DeviceInfo centralised on coordinator (sensor + binary_sensor share it) - CONF_ADDRESS removed from sensor.py (coordinator holds address) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -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"]
|
||||
PLATFORMS = ["sensor", "binary_sensor"]
|
||||
|
||||
|
||||
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
||||
|
||||
Reference in New Issue
Block a user