Discover scalar composite features in Home Assistant#32363
Conversation
9bc2097 to
5f6341a
Compare
|
Superseded by the current live validation notes in the PR description. |
83f963b to
dfc285f
Compare
|
I think this is similar to #32362 (comment), maybe we should change the device expose instead? I think we over-used |
dfc285f to
27217e5
Compare
|
Agreed on the distinction. This PR is scoped to safe scalar composite children only; atomic composite controls that need one object payload should stay composite or be represented differently in the converter. The water-valve work also has a converter-side split where possible, so this generic path is for the remaining cases where scalar config/diagnostic values are still nested inside a composite. |
Summary
config/diagnosticmetadata from composite exposes to scalar child entities.Review feedback addressed
Home Assistant limitation
MQTT discovery can set
entity_categoryandenabled_by_default, but it cannot create arbitrary custom sections on a device page or attach sibling entities to a valve more-info dialog. Grouped irrigation/manual-control UI still needs a dashboard/card or future Home Assistant support.Scope note
overrideHaDiscoveryPayloadwas moved to the smaller dedicated PR Pass device options to HA discovery overrides #32379 so this PR stays focused on scalar composite discovery.Validation
npm exec --yes pnpm@10.18.3 -- exec vitest run test/extensions/homeassistant.test.ts --config ./test/vitest.config.mtsnpm exec --yes pnpm@10.18.3 -- run checknpm exec --yes pnpm@10.18.3 -- run buildLive validation on my Home Assistant instance
homeassistant/number/0xa4c1381456c7ffff/irrigation_plan_remove_plan_index/configcontainsentity_category: config,enabled_by_default: false, and commandszigbee2mqtt/Bewässerungsventil/set/irrigation_plan_remove_plan_index.zigbee2mqtt/bridge/devicesand no longer exposes the oldirrigation_plan_removecomposite publicly.Combined live validation on my Home Assistant instance - 2026-06-23:
node --run check,node --run build, andnode --run testlocally: 23 files, 792 tests passed.number.bewasserungsventil_manual_irrigation_duration,select.bewasserungsventil_manual_irrigation_mode,select.bewasserungsventil_manual_irrigation_amount_unit, andnumber.bewasserungsventil_manual_fail_safe.