Quirks V1 equivalent to V2's switch, number, enum, etc? #4407
Unanswered
ekaszubski
asked this question in
Q&A
Replies: 1 comment 3 replies
-
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
My understanding of quirks in general is that they assist in mapping manufacturer-specific functionality, like non-standard attribute IDs, onto, at a minimum, standard types like uint8_t. They also assist in constraining those mappings to specific cluster IDs (typically also manufacturer-specific).
There also appear to be some rules as to when home assistant entities are created for a given attribute; "standard" clusters like OnOff seem to have entities created automatically, but custom clusters and attributes don't appear to have any entities created even when mapped to a standard type like uint8_t, presumably because the value stored in that uint8_t could be 0/1 = on/off (switch) , or a set of modes e.g. 0/1/2 = mode1/mode2/mode3 (select), etc.
Quirks V2 seems to solve this via .switch(), .number(), .enum(), etc, which appear to help define the mapping from the manufacturer-specific values defined in the quirk's replacement clusters onto standardized home assistant entities like switch, select, number. What is the equivalent functionality for Quirks V1, i.e. how can I ensure that a specific kind of home assistant entity is created for a manufacturer-specific attribute using Quirks V1?
Beta Was this translation helpful? Give feedback.
All reactions