-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[mqtt] Simplify homeassistant thing types, and use AbstractStorageBasedTypeProvider #16600
Merged
lsiepel
merged 11 commits into
openhab:main
from
ccutrer:mqtt-homeassistant-simplify-types
Aug 12, 2024
Merged
[mqtt] Simplify homeassistant thing types, and use AbstractStorageBasedTypeProvider #16600
lsiepel
merged 11 commits into
openhab:main
from
ccutrer:mqtt-homeassistant-simplify-types
Aug 12, 2024
Commits on Jul 26, 2024
-
[mqtt.homeassistant] don't dynamically generate channel types
Instead, use state descriptions for the varying parts, which means that there is not an explosion of channel types for every single Home Assistant channel, which can cause performance issues if you have a lot of devices/channels Signed-off-by: Cody Cutrer <cody@cutrer.us>
Configuration menu - View commit details
-
Copy full SHA for 1c0bdcb - Browse repository at this point
Copy the full SHA 1c0bdcbView commit details -
[mqtt.homeassistant] dynamically change thing type after creation
This has two important impacts, and one not-as-important-but-still- beneficial impact: * ThingTypes are not created for Things that are never actually created, but only discovered, reducing bloat. * Avoids warnings about things types not being in the registry * Thing IDs end up like mqtt:homeassistant:broker:mydevice instead of mqtt:homeassistant_mydevice:broker:mydevice Note that already-created things will maintain their original ID, and it's only new things created from auto-discovery that will have the new, shorter thing IDs. Signed-off-by: Cody Cutrer <cody@cutrer.us>
Configuration menu - View commit details
-
Copy full SHA for b3e4feb - Browse repository at this point
Copy the full SHA b3e4febView commit details -
[mqtt.homeassistant] simplify channel ids for newly discovered things
This is triggered by a property only set by discovery, so will only apply to newly created things. Channel groups are now named after simply the component type and object_id, if possible, and without additional encoding, instead off encoding the unique_id. Most devices will encode the component type and device identifiers into the unique_id, and of arbitrary format, so it is far more complicated than necessary, when a channel group is already only within the scope of the thing/device. Many component types that can only ever have one channel (button, switch, sensor, select, scene, etc.) will not be in a channel group anymore. In this case their channel id is what their group id would have been, without the repetitiveness of "sensor_<unique_id>#sensor". Signed-off-by: Cody Cutrer <cody@cutrer.us>
Configuration menu - View commit details
-
Copy full SHA for bbdfdc3 - Browse repository at this point
Copy the full SHA bbdfdc3View commit details -
[mqtt] Use AbstractStorageBasedTypeProvider
Includes both homie and homeassistant dynamic things. It also fixes all ordering issues in both bindings in order to be consistent in how types are persisted: * For Homie, Nodes (channel groups) and Properties (channels) are ordered in the way they are defined in $nodes and $properties * For Home Assistant, Components are ordered by label. This includes both single channel components that are not in a channel group, as well as channel groups. We also ensure that on the Thing itself non-grouped channels consistently sort before grouped channels. Signed-off-by: Cody Cutrer <cody@cutrer.us>
Configuration menu - View commit details
-
Copy full SHA for 2e86a4e - Browse repository at this point
Copy the full SHA 2e86a4eView commit details -
Configuration menu - View commit details
-
Copy full SHA for c377dcd - Browse repository at this point
Copy the full SHA c377dcdView commit details -
address itests compilation errors
Signed-off-by: Cody Cutrer <cody@cutrer.us>
Configuration menu - View commit details
-
Copy full SHA for cb2a0ec - Browse repository at this point
Copy the full SHA cb2a0ecView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9c1f7f0 - Browse repository at this point
Copy the full SHA 9c1f7f0View commit details -
fix errors introduced by last commit
the ternary accidentally got swapped Signed-off-by: Cody Cutrer <cody@cutrer.us>
Configuration menu - View commit details
-
Copy full SHA for c835743 - Browse repository at this point
Copy the full SHA c835743View commit details -
fix itest for new channel names
Signed-off-by: Cody Cutrer <cody@cutrer.us>
Configuration menu - View commit details
-
Copy full SHA for d2685f2 - Browse repository at this point
Copy the full SHA d2685f2View commit details
Commits on Aug 12, 2024
-
Use ChannelType ID constants, not strings
Signed-off-by: Cody Cutrer <cody@cutrer.us> Co-Authored-By: Anton Kharuzhy <publicantroids@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for a88d40b - Browse repository at this point
Copy the full SHA a88d40bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4c90379 - Browse repository at this point
Copy the full SHA 4c90379View commit details
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.