more ❤️ for the integration implementation#4
Merged
Conversation
Replace YAML-only setup with GUI config flow including connection test. Introduce DataUpdateCoordinator with async-compatible socket handling (timeout, context manager, executor job). Consolidate 13 copy-paste sensor classes into a single SensorEntity + SensorEntityDescription list. - Add proper device_info, unique_id, device classes, state classes - Use native_value/native_unit_of_measurement (modern HA API) - Replace deprecated device_state_attributes with extra_state_attributes - Fix 2-byte parsing bug (was *255, now int.from_bytes big-endian) - Add entity translations for stove states and fan states - Bump version to 0.1.0
31 tests covering: - Binary protocol parser: all stove states, fan states, 2-byte values, edge cases - Config flow: form display, successful connection, connection failure, duplicate abort - Sensor platform: entity creation, unique IDs, values, attributes, unload
Existing YAML configurations are automatically imported as config entries on startup. A repair issue prompts the user to remove the YAML config. Duplicate imports are silently aborted.
The old YAML config was a sensor platform entry (sensor: platform: ledatroniclt3), not a top-level integration key. The import must happen via async_setup_platform in sensor.py, not async_setup in __init__.py. Also keeps the legacy PLATFORM_SCHEMA for validation.
The status packet is 16 bytes (framed by 0e ff ... 0d ff), not 56. The old implementation read past the packet boundary, producing garbage values for several sensors. Protocol corrections from independent analysis: - Read until 0d ff end marker instead of fixed 56 bytes - Fix valve actual/target byte positions (byte 2=actual, 3=target) - Firebed temperature is a 2-byte value (was read as single byte) - Add error code sensor (overheating, motor fault, power fault, etc.) - Add starting/initializing state - Remove sensors that require command requests to the device: buffer temps, chimney temp, fan, burns, heating error count (these are optional expansion modules - contributions welcome) - Use English state keys with proper translations
SVG source and PNG exports (256px + 512px hDPI) for use with HACS and the home-assistant/brands repository.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
rewrote the whole thing basically. was yaml-only, now has a config flow (UI setup). also fixed the protocol - turns out the status packet is 16 bytes, not 56. we were reading garbage from the next packet for half the sensors lol.
what changed:
if you have extra hardware modules (KS04 buffer storage, LUC chimney sensor, etc) and want to help: the integration currently only reads the base status packet. to add support for your module, open an issue with the raw packet log.
to get it, set the log level in your configuration.yaml:
then check your HA logs for lines like Status packet (16 bytes): ... and include what hardware you have and what values your stove is showing.
or if you're feeling adventurous, PRs welcome :)