ha: add carefree_bt12 integration for the Carefree Connects awning
Commands reverse-engineered from Bluetooth HCI snoop captures (adb bugreport) of the official Carefree Connects (BT12) Android app, confirmed across three independent captures including two isolated single-action live tests: extend/retract (feature 0x05, values 0x01/0x02 -- the device toggles motor state internally, there's no separate stop byte) and light on/off (feature 0x1a, values 0x19/0x01). Both live under GATT characteristic 02060002 on service 02060001-50e1-405f-bab0-6bb582b4d96e. Connects on demand per command (mirrors the app's own connect/act/disconnect pattern) rather than holding a persistent connection like li3_battery, since this device doesn't stream telemetry. Cover/light state is assumed/optimistic -- the notify channel (02060003) isn't decoded yet, so a diagnostic sensor just surfaces raw undecoded replies to build up data for that follow-on work. Verified end-to-end against the real device: light on/off and awning extend both worked through Home Assistant. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
7911339743
commit
918003d2e3
@@ -0,0 +1,25 @@
|
||||
"""The Carefree Connects BT12 awning integration."""
|
||||
from __future__ import annotations
|
||||
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import Platform
|
||||
from homeassistant.core import HomeAssistant
|
||||
|
||||
from .const import DOMAIN
|
||||
from .coordinator import Bt12Coordinator
|
||||
|
||||
PLATFORMS: list[Platform] = [Platform.COVER, Platform.LIGHT, Platform.SENSOR]
|
||||
|
||||
|
||||
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
||||
coordinator = Bt12Coordinator(hass, entry.data["address"])
|
||||
hass.data.setdefault(DOMAIN, {})[entry.entry_id] = coordinator
|
||||
await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
|
||||
return True
|
||||
|
||||
|
||||
async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
||||
unload_ok = await hass.config_entries.async_unload_platforms(entry, PLATFORMS)
|
||||
if unload_ok:
|
||||
hass.data[DOMAIN].pop(entry.entry_id)
|
||||
return unload_ok
|
||||
Reference in New Issue
Block a user