natekspencer / hacs-litterrobot

Home Assistant integration for a Litter-Robot Connect self-cleaning litter box
MIT License
8 stars 1 forks source link

POLL: How do you want DF1/DF2 mapped in vacuum state? #7

Closed natekspencer closed 3 years ago

natekspencer commented 3 years ago

POLL: How do you want DF1/DF2 mapped in vacuum state?

Currently, the vacuum entity sees DF1 (drawer full, 2 cycles left) and DF2 (drawer full, 1 cycle left) as non-error states. Thus, they are mapped to the "docked" vacuum state. The idea behind this was that the error state should indicate that manual intervention is, most likely, required before another clean cycle can be triggered. DF1 and DF2 indicate that the box is nearly full, but not to the point that it will prevent another cycle.

That differs slightly, however, from how the Litter-Robot companion apps trigger "Drawer Full" notifications by notifying on DF1, DF2 and a final "won't auto cycle anymore" notification for DFS. Personally, I ignore the "Drawer Full" notification until it states that it won't auto cycle anymore, but I know others aren't the same and will want to act on DF1 and/or DF2.

While there are other ways to automate around DF1/DF2 (and other statuses), such as subscribing to the "unit_status_code" attribute on the litter box vacuum entity, the goal is to make the vacuum "state" appropriately indicate the overall state.

So from your perspective, how do you want DF1/DF2 mapped in vacuum state?

Click on one (or more) of the options above to cast your vote!

elmigbot commented 3 years ago

Could DF1, DF2, DFS be binary sensors?

natekspencer commented 3 years ago

Could DF1, DF2, DFS be binary sensors?

They could, but they are mutually exclusive. So if one was on, the other 2 would always be off. So I'm not sure that really makes sense. It MIGHT make sense to group them into a single binary sensor for drawer_full or something like that. But what is your use case and maybe we can think through it?

elmigbot commented 3 years ago

True, a sensor with 4 possible values works as well. I thought it was slightly easier to represent the meaning of the values with Binary Sensors names. Either way works for my use case of driving conditional UI elements with DF1 and DF2, and an additional text message when DFS.

Unrelated question, is the "Cat Sensor Timing" state available? It would be useful to catch which of my cats is using the robot.

natekspencer commented 3 years ago

You can currently get the "code" from the vacuum entity like this:

{{ state_attr('vacuum.entity_id_litter_box','unit_status_code') }}

And yes, Cat Sensor Timing, or CST, is included in those.

elmigbot commented 3 years ago

Oh! Great! Thanks!