Closed julianrinaldi closed 3 years ago
Same problem after installing 2021.11 beta all versions. Attributes are now sensors I believe.
Confirming issue on latest version of Home Assistant 2021.11, as part of the breaking changes (check the "Xiaomi Miio" changes, seems the attributes are now separate sensors)
Was coming here to say that :)
Additionally for anyone who didn't read the breaking changes the sensors that are now missing for this card are disabled by default so you will need to manually enable them. Hopefully this is a simple fix to get the card functional again
Additionally for anyone who didn't read the breaking changes the sensors that are now missing for this card are disabled by default so you will need to manually enable them. Hopefully this is a simple fix to get the card functional again
sadly it isn't... also enabling them and renaming them under attributes when configuring the card doesn't help. waiting for a solution for this as well...
Not ideal, but I found a way to get it back working (though I don't expect this to be 100%) by using a template vacuum:
In the above I am using the vacuum.roborock_vacuum_s6
and all new sensors around it to create a vacuum.roborock_vacuum_s6_fix
:
vacuum:
- platform: template
vacuums:
roborock_vacuum_s6_fix:
friendly_name: Limpinho
value_template: >-
{{ states('vacuum.roborock_vacuum_s6') }}
battery_level_template: >-
{{ state_attr('vacuum.roborock_vacuum_s6', 'battery_level') }}
fan_speed_template: >-
{{ state_attr('vacuum.roborock_vacuum_s6', 'fan_speed') }}
attribute_templates:
main_brush_left: >-
{{ int(states('sensor.roborock_vacuum_s6_main_brush_left') | int / 3600) }}
side_brush_left: >-
{{ int(states('sensor.roborock_vacuum_s6_side_brush_left') | int / 3600) }}
filter_left: >-
{{ int(states('sensor.roborock_vacuum_s6_filter_left') | int / 3600) }}
sensor_dirty_left: >-
{{ int(states('sensor.roborock_vacuum_s6_sensor_dirty_left') | int / 3600) }}
status: >-
{{ state_attr('vacuum.roborock_vacuum_s6', 'status') }}
fan_speeds: ["Silent", "Standard", "Medium", "Turbo", "Gentle", "Auto"]
start:
- service: vacuum.start
target:
entity_id: vacuum.roborock_vacuum_s6
pause:
- service: vacuum.pause
target:
entity_id: vacuum.roborock_vacuum_s6
stop:
- service: vacuum.stop
target:
entity_id: vacuum.roborock_vacuum_s6
return_to_base:
- service: vacuum.return_to_base
target:
entity_id: vacuum.roborock_vacuum_s6
clean_spot:
- service: vacuum.clean_spot
target:
entity_id: vacuum.roborock_vacuum_s6
locate:
- service: vacuum.locate
target:
entity_id: vacuum.roborock_vacuum_s6
set_fan_speed:
- service: vacuum.set_fan_speed
target:
entity_id: vacuum.roborock_vacuum_s6
This is not an ideal solution, and the best way going forward is to change the plugin to support the new way of working!
Dammit. I have 6 Roborock S6. That’s going to be a lot of clicking to enable those entities.
Sent from my iPhone
On Nov 4, 2021, at 3:04 PM, kimme1024 @.***> wrote:
Additionally for anyone who didn't read the breaking changes the sensors that are now missing for this card are disabled by default so you will need to manually enable them. Hopefully this is a simple fix to get the card functional again
sadly it isn't... also enabling them and renaming them under attributes when configuring the card doesn't help. waiting for a solution for this as well...
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
Not ideal, but I found a way to get it back working (though I don't expect this to be 100%) by using a template vacuum:
In the above I am using the
vacuum.roborock_vacuum_s6
and all new sensors around it to create avacuum.roborock_vacuum_s6_fix
:vacuum: - platform: template vacuums: roborock_vacuum_s6_fix: friendly_name: Limpinho value_template: >- {{ states('vacuum.roborock_vacuum_s6') }} battery_level_template: >- {{ state_attr('vacuum.roborock_vacuum_s6', 'battery_level') }} fan_speed_template: >- {{ state_attr('vacuum.roborock_vacuum_s6', 'fan_speed') }} attribute_templates: main_brush_left: >- {{ int(states('sensor.roborock_vacuum_s6_main_brush_left') | int / 3600) }} side_brush_left: >- {{ int(states('sensor.roborock_vacuum_s6_side_brush_left') | int / 3600) }} filter_left: >- {{ int(states('sensor.roborock_vacuum_s6_filter_left') | int / 3600) }} sensor_dirty_left: >- {{ int(states('sensor.roborock_vacuum_s6_sensor_dirty_left') | int / 3600) }} status: >- {{ state_attr('vacuum.roborock_vacuum_s6', 'status') }} fan_speeds: ["Silent", "Standard", "Medium", "Turbo", "Gentle", "Auto"] start: - service: vacuum.start target: entity_id: vacuum.roborock_vacuum_s6 pause: - service: vacuum.pause target: entity_id: vacuum.roborock_vacuum_s6 stop: - service: vacuum.stop target: entity_id: vacuum.roborock_vacuum_s6 return_to_base: - service: vacuum.return_to_base target: entity_id: vacuum.roborock_vacuum_s6 clean_spot: - service: vacuum.clean_spot target: entity_id: vacuum.roborock_vacuum_s6 locate: - service: vacuum.locate target: entity_id: vacuum.roborock_vacuum_s6 set_fan_speed: - service: vacuum.set_fan_speed target: entity_id: vacuum.roborock_vacuum_s6
This is not an ideal solution, and the best way going forward is to change the plugin to support the new way of working!
Yeah, sounds like a nice workaround but still the fix on the plugin is the way to go!
Lets wait for @benct :)
Pull request that broke stuff: https://github.com/home-assistant/core/pull/54990
note that also buttons are now missing due to ha-icon-button
no longer using icon
FIX:
diff --git a/homeassistant-config/www/xiaomi-vacuum-card.js b/homeassistant-config/www/xiaomi-vacuum-card.js
index 25d6aae..d72ba29 100644
--- a/homeassistant-config/www/xiaomi-vacuum-card.js
+++ b/homeassistant-config/www/xiaomi-vacuum-card.js
@@ -306,9 +306,8 @@
return data && data.show !== false
? html`<ha-icon-button
@click="${() => this.callService(data.service, data.service_data)}"
- icon="${data.icon}"
title="${data.label || ''}"
- style="${this.config.styles.icon}"></ha-icon-button>`
+ style="${this.config.styles.icon}"><ha-icon style="display:flex;" icon="${data.icon}"></ha-icon></ha-icon-button>`
: null;
}
Yep, definitely broken. Thanks to all of you who hotfixed this with workarounds. Author needs to incorporate the new breaking changes, though :)
Should be fixed in version 4.4.0
, at least for Xiaomi vacuums (remember to clear browser cache after update)
Looks like counters for xiaomi are still not working (or there is an issue with Roborock S7):
Any idea?
Updated to 4.4.0 through HACS on core-2021.11.1, supervisor-2021.10.8. Activated all deactivated referring entities through Settings --> Integrations --> Xiaomi Miio. Browser cache cleared.
But:
The entities are showing through "Devices" on HA though:
I have 2 Roborock S5 Max devices (2 storey house, one device for each floor). Both are showing the same like the pictures above.
add vendor: xiaomi
to the card config in order to use the new processing of entities
Alredy have added vendor, below is my card config:
So it doesnt help either.
Alredy have added vendor, below is my card config:
So it doesnt help either.
worked for me. Have you re-enabled all the required entities that were disabled by HA by default after the update?
Alredy have added vendor, below is my card config: So it doesnt help either.
worked for me. Have you re-enabled all the required entities that were disabled by HA by default after the update?
Yep, I do have all entities enabled (also, I have disabled and re-enabled them after card update):
Mkay, I figured it out :) Name of entity for vacuum was: vacuum.roborock_vacuum_a15 But all other entities are: sensor.roborock_s7_XXX
So to fix it, it required to change entity of vacuum device and now card is working as expected (except mop and cleaned are status but I dont need them too much).
It's working now with both vacuums.
@znanywawa hint made the difference: "So to fix it, it required to change entity of vacuum device and now card is working as expected."
Should be fixed in version
4.4.0
, at least for Xiaomi vacuums (remember to clear browser cache after update)
Working fine here now, no need to use my "hack" anymore! Thank you for the prompt fix! 🙂
The main card is working now, but the "Customize specific state values" is still not working for me, does anybody know if I can fix it?
- type: custom:xiaomi-vacuum-card
entity: vacuum.xiaomi_vacuum_cleaner
image: /local/Floorplan_images/vacuum.png
name: My Vacuum
vendor: xiaomi
buttons:
spot:
show: false
state:
cleaning_time:
key: cleaning_time
label: 'Cleaning time: '
unit: ' min'
cleaned_area:
key: cleaned_area
label: 'Cleaned area: '
unit: ' m2'
attributes:
total_cleaning_time:
key: total_cleaning_time
label: 'Total time: '
unit: ' min'
total_cleaned_area:
key: total_cleaned_area
label: 'Total area: '
unit: ' m2'
@znanywawa hint made the difference: "So to fix it, it required to change entity of vacuum device and now card is working as expected."
still doesn't work for me ... name of the entity is correct, sensors show up values in the entity list, however stay unavailable in the card itself
If it still does not work, try the following:
vacuum.some_cool_vacuum
main_brush_left
sensor.some_cool_vacuum_main_brush_left
following
The main card is working now, but the "Customize specific state values" is still not working for me, does anybody know if I can fix it?
- type: custom:xiaomi-vacuum-card entity: vacuum.xiaomi_vacuum_cleaner image: /local/Floorplan_images/vacuum.png name: My Vacuum vendor: xiaomi buttons: spot: show: false state: cleaning_time: key: cleaning_time label: 'Cleaning time: ' unit: ' min' cleaned_area: key: cleaned_area label: 'Cleaned area: ' unit: ' m2' attributes: total_cleaning_time: key: total_cleaning_time label: 'Total time: ' unit: ' min' total_cleaned_area: key: total_cleaned_area label: 'Total area: ' unit: ' m2'
@benct As this issue is closed, should I open a new one for this problem with customize state values?
Answering my own question, the issue was the name of the entities, I have updated them and it is showing the correct numbers (I just need to figure out if it is possible to change from seconds to minutes or hours, but that is a different issue...):
- type: custom:xiaomi-vacuum-card
entity: vacuum.xiaomi_vacuum_cleaner
image: /local/Floorplan_images/vacuum.png
name: My Vacuum
vendor: xiaomi
buttons:
spot:
show: false
state:
cleaning_time:
key: last_clean_duration
label: 'Last clean duration: '
unit: ' s'
cleaned_area:
key: last_clean_area
label: 'Last clean area: '
unit: ' m2'
attributes:
total_cleaning_time:
key: total_duration
label: 'Total time: '
unit: ' s'
total_cleaned_area:
key: total_clean_area
label: 'Total area: '
unit: ' m2'
In 2021.11.0 Beta, the sensors for the Xiaomi vacuum card have changed, due to the addition of the new non-primary/diagnostic entities. I figure this is already known, but I figured I'd make an issue for it.