Skip to content

Help with assigning values in a Bitfield #1199

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

You must be logged in to vote

So it is likely that bit 0 (value 1) is the Tank full indicator, and bit 1 (value 2) is whatever error E2 is.
What I would do with this info is create two binary_sensor entities - one for "Tank full", and the other for "Fault", which I would still make a catch all, rather than just detecting error 2, to be safe in case undocumented faults exist, or E2 is actually a different bit. The full fault code should be left as an attribute on the main entity in case anyone wants to check that a fault is really E2 or something else.

  - entity: binary_sensor
    class: problem
    name: Tank full
    icon: "mdi:cup-water"
    dps:
      - id: 19
        type: bitfield
        name: sensor
        ma…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@make-all
Comment options

Answer selected by mihsu81
Comment options

You must be logged in to vote
2 replies
@make-all
Comment options

@mihsu81
Comment options

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