-
Notifications
You must be signed in to change notification settings - Fork 37
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
Support binary sensors #89
Labels
enhancement
New feature or request
Comments
Thanks. I've seen #84. Card works for ok "sensor" state but not for "binary_sensor" state (like mop_attached and water_box_attached). template:
- sensor:
name: Robot Mop Attached
unique_id: sensor.robot_mop_attached
state: >
{% if is_state('binary_sensor.robot_mop_attached', 'off') %}
No
{% elif is_state('binary_sensor.robot_mop_attached', 'on') %}
Yes
{% endif %}
availability: >
{% if is_state('vacuum.robot', 'unavailable') %}
false
{% else %}
true
{% endif %}
icon: >
{% if is_state('binary_sensor.robot_water_box_attached', 'on') %}
mdi:square
{% else %}
mdi:square-off
{% endif %}
- sensor:
name: Robot Water Box Attached
unique_id: sensor.robot_water_box_attached
state: >
{% if is_state('binary_sensor.robot_water_box_attached', 'off') %}
No
{% elif is_state('binary_sensor.robot_water_box_attached', 'on') %}
Yes
{% endif %}
availability: >
{% if is_state('vacuum.robot', 'unavailable') %}
false
{% else %}
true
{% endif %}
icon: >
{% if is_state('binary_sensor.robot_water_box_attached', 'on') %}
mdi:water
{% else %}
mdi:water-off
{% endif %} - type: custom:xiaomi-vacuum-card
entity: vacuum.robot
name: Robot
vendor: xiaomi
image: /local/community/lovelace-xiaomi-vacuum-card/vacuum.png
attributes:
main_brush:
key: main_brush_left
side_brush:
key: side_brush_left
filter:
key: filter_left
sensor:
key: sensor_dirty_left
mop_attached:
label: 'Mop attached: '
key: mop_attached
water_box_attached:
label: 'Water box attached: '
key: water_box_attached |
benct
changed the title
Certain attributes show as unavailable since HA update 2021.11
Support binary sensors
Mar 4, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Certain attributes show as unavailable on the card. The sensors are enabled and working.
mop_attached
water_box_attached
I think this happens because they are binary_sensors and currently the card only reads "sensor" values, but not "binary_sensor" values.
The text was updated successfully, but these errors were encountered: