Skip to content

Madimack Elite V3 pool heatpump Fault Code are a bitmap field, how to resolve #2154

Answered by make-all
sikkek asked this question in Q&A
Discussion options

You must be logged in to vote

The type bitfield is designed to handle this (I came up with the type name before I saw that Tuya uses bitmap, and I avoided that name to avoid confusion with the image type).

The difference between integer and bitfield is that when comparing mappings, instead of a normal = comparison, the bitfield compares only the bits that are set (current_value & mapping_value = mapping_value).

So your mapping just needs to match the individual values you want to match.

Since there can only be a single value at the end, the first match is used, so if you want to detect multiple values at once, use a binary_sensor for every important thing you want to detect.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@sikkek
Comment options

@make-all
Comment options

Answer selected by sikkek
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants