Repository navigation
Releases: Pulpyyyy/ESPSomfy-RTS-enhanced
Release list
v3.5.0
Device health and reliable backups
New
- Connectivity diagnostic binary sensor per device.
onwhile the
websocket is connected and the HTTP API answers a light probe
(GET /rooms, 5 s timeout, every 60 s;/discoveryon firmware without
/rooms). It turnsoffas soon as either fails, and the entity itself
stays available. Attributes:last_probe_ok,websocket_connected,
ws_reconnects. Only transitions are logged (one WARNING when the device
goes offline, one INFO when it comes back). No external Ping entry is
needed any more to condition an automation on the device being reachable. - Last backup diagnostic timestamp sensor, with a
backup_count
attribute. It is derived from the backup files already on disk, so nothing
extra is written to the device or the host. - Number of backups to keep option (1 to 50). Existing entries keep 5.
Changed
espsomfy_rts_enhanced.backup(and the Backup button) now fails with an
error when the backup could not be written, or immediately, without any
request, when the Connectivity sensor isoff. Automation traces show the
failure instead of a success.- Old backups are rotated only after a new one has been written.
- The Backup button no longer turns unavailable when the websocket drops:
Home Assistant skips unavailable entities in service calls, which turned a
backup of an offline device into a silent no-op.
Fixed
- Shade covers failed to be created after the firmware-room area seeding
added since v3.4.0 ('ESPSomfyController' object has no attribute 'room_name'). This never shipped in a release.
No existing entity id or unique id changes; the new entities are additive.
See docs/Services.md
for a nightly backup automation conditioned on the Connectivity sensor.
v3.4.0
external-attrs contract — the end of multi-shade attribute ping-pong
Completes the ÷2 double-write fix from v3.3.x and removes the display freeze
that happened while several shades were moving at once.
- Extra attributes injected by a third-party component (cover-extender, for
instance) now travel through a shared contract
(hass.data['cover_external_attrs']) instead of a cross state rewrite.
No more attribute round-trips multiplyingstate_changedevents. - Dynamic reader handshake: the third-party component deposits its extras,
the cover entity soft-merges them and rewrites itself once, on a dispatcher
signal. - Works with the third-party component absent — the read is soft and has no
impact. - Still one entity per shade.
Tests: the pytest suite passes, including the end-to-end run against a real
Home Assistant.
v3.3.1
Fixes
- Cover: state was written twice per shade update; it is now written once, halving state-machine churn during shade movements.
- Version display: the device sw_version shown in Home Assistant was stuck at v3.1.0 (const.py had been left behind by the 3.2.0/3.3.0 bumps); it now matches the release.
Tests
- Regression guard: entry setup must create the cover entities.
v3.3.0
ESPSomfy-RTS Enhanced v3.3.0
Critical fix: covers were not being created (all shades restored as unavailable).
The setup no longer relied on /discovery to carry the shade/group list — which a firmware in full-auth mode omits without a token. Setup now explicitly loads shades and groups after login, so every cover entity is created again.
Coordinated with firmware v3.3.0.
v3.2.0
ESPSomfy-RTS Enhanced v3.2.0
Coordinated with firmware v3.2.0.
Fixes
- Garage door offers Open/Close/Stop before the first state update
groupRemovednow removes the group's entities and device- Accept both
shadesandlinkedShadesin group state - Config backups written with private permissions (0600), raw bytes, outside www/
- Full config-flow error handling for offline devices (real aiohttp exceptions)
- Robust state parsing (sentinels, non-dict payloads, missing fields)
- Honest
verify_ssl, dead code removed, dependency bounds
Notes
- Requires firmware that authenticates by PIN if the device is in full-auth mode
- First automated pytest suite runs in CI
v3.1.0
Structural overhaul (tested against a real device)
- Websocket rewritten with native aiohttp: no more
websocket-clientthread orthreading.Timer— a single asyncio task in the HA event loop, 20 s heartbeat, capped-backoff reconnection. Thewebsocket-clientdependency is removed. Tested against a real device: connection, event parsing, event filter, error path (closed port), clean shutdown during backoff, reconnection. entry.runtime_datareplaceshass.data[DOMAIN](modern HA pattern, typedESPSomfyConfigEntryalias).- EntityDescription subclasses are frozen kw_only dataclasses (future-proof against the FrozenOrThawed deprecation).
- Cleanups: redundant
should_pollproperty overrides removed, missingawaiton reconnection inset_host,Anyannotations.
Documentation
- The services documentation now lives in
docs/Services.md; dead wiki links in the READMEs are fixed.
v3.0.2
Fixes
- IP address sensor: the historical
ip_addressstypo is fixed toip_address. The existing entity is migrated automatically at startup (unique_id updated in the entity registry) — no entity_id change, no orphaned entity. - Firmware release notes: when fetching from GitHub fails, the integration no longer displays a hardcoded error string as the release notes; it logs the error and HA falls back to the release link. Explicit aiohttp timeout.
v3.0.1
Fixes (full component audit)
- Reboot button: a wrong version comparison made it disappear with firmware >= 3.0.0.
- Backup rotation: targeted a non-existent directory (
ESPSomfyRTS_espsomfy_<id>) so it never ran. Fixed (keeps the 5 most recent files), runs outside the event loop, failures are logged. - Authentication: the apikey header is now sent on every REST command (shadeCommand, groupCommand, tiltCommand, shades, groups) — fixes 401 errors on devices with restricted permissions.
- Button availability: buttons never went unavailable when the ESP disconnected.
- Setup: platforms are loaded after a successful login (no more double loading on retry); the websocket reconnect timer is cancelled on unload (leak fixed).
- Config flow: crash on some login errors fixed; non-existent
wrong_hosterror key replaced withinvalid_host. - Update entity:
SPECIFIC_VERSIONis now honored; misplaced parenthesis in switch.py; kwargs were passed incorrectly to CoverGroup.
New
- Reauth flow: if the device rejects the stored credentials, HA now prompts for new ones (en/fr/de/es).
- Automatic reload after changing the host or credentials in the options flow.
- Toggle shade types (one-button garage doors, gates): dynamic OPEN/CLOSE/STOP buttons based on the current movement (the function existed upstream but was never wired up).
Cleanup
Dead code was checked against the rstrouse upstream before removal (unfinished restore action, ensure_*_configured, unused constants); aiofiles pinned; empty homekit block removed.
v3.0.0
Fixes
- Backup 401 fixed: the integration now logs in to the ESPSomfy-RTS device during setup, so the API key is set and authenticated REST calls (backup) work.
- Backup failures are now logged with the HTTP status and response instead of failing silently.
Changes
- Repository links (manifest, README) now point to Pulpyyyy/ESPSomfy-RTS-enhanced.
- Manual dispatch enabled for the hassfest workflow.