Conversation
MaxRink
force-pushed
the
ha-discovery-valve-switch
branch
from
June 22, 2026 10:55
1d7a9d2 to
19a2ac1
Compare
MaxRink
force-pushed
the
ha-discovery-valve-switch
branch
3 times, most recently
from
June 22, 2026 11:30
b4e01f6 to
6e1e2e6
Compare
Owner
|
Given that the |
MaxRink
force-pushed
the
ha-discovery-valve-switch
branch
from
June 22, 2026 19:44
6e1e2e6 to
1f86eb0
Compare
Contributor
Author
|
Yes, changing the Home Assistant discovery component from I adjusted the implementation so the old object ID shape is preserved ( |
This was referenced Jun 23, 2026
Owner
|
MaxRink
force-pushed
the
ha-discovery-valve-switch
branch
from
June 23, 2026 18:44
ba3bc8a to
bdf543a
Compare
Owner
|
Im wondering if we maybe can just do this through the override ha discovery payload which already exists in zhc? |
MaxRink
marked this pull request as draft
June 25, 2026 17:05
MaxRink
force-pushed
the
ha-discovery-valve-switch
branch
from
June 25, 2026 17:52
bdf543a to
c1e78d9
Compare
MaxRink
marked this pull request as ready for review
July 4, 2026 19:46
MaxRink
force-pushed
the
ha-discovery-valve-switch
branch
from
July 31, 2026 12:11
c1e78d9 to
7782333
Compare
MaxRink
force-pushed
the
ha-discovery-valve-switch
branch
from
August 14, 2026 17:35
7782333 to
895091e
Compare
MaxRink
force-pushed
the
ha-discovery-valve-switch
branch
from
August 28, 2026 01:28
895091e to
6c2452c
Compare
MaxRink
force-pushed
the
ha-discovery-valve-switch
branch
from
August 30, 2026 22:32
6c2452c to
701d268
Compare
Signed-off-by: Maximilian Rink <maximilian.rink@telekom.de>
This branch has not been deployed
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.
Summary
Verify that switch exposes can already be discovered as Home Assistant MQTT valves through the existing generic
homeassistant.typemetadata and ZHCoverrideHaDiscoveryPayloadcallback. The final change adds integration tests only: the valve-specific Zigbee2MQTT discovery branch has been removed.The tests cover ordinary and endpoint-scoped valves, ON/OFF open/close payloads and states, endpoint command topics, stable discovery object IDs and unique IDs, and removal of the previous retained switch discovery.
Migration
Changing the Home Assistant component from
switchtovalvecreates a different entity-domain identity even with the sameunique_id. Home Assistant's registry keys entries by(domain, platform, unique_id): https://github.com/home-assistant/core/blob/dev/homeassistant/helpers/entity_registry.pyThe tests verify removal of the old retained switch discovery; they do not claim to preserve the old Home Assistant entity registry entry. Existing automations and dashboards referencing the switch entity need migration. No live Home Assistant instance was used.
Paired converter change
Koenkk/zigbee-herdsman-converters#13232 enables the existing metadata and callback for SONOFF SWV-ZFE/ZFU, SWV-ZF2 and SWV-ZNE/ZNU. This test-only PR does not activate device behavior by itself.
Validation