Hi All,
Sorry it took me a while to see an upgrade to 2.X happened for the card.
Zones template to automatically receive zones from the App is still working - just some minor changes to the template are necessary.
Here my example again (just in case somebody is interested):
- type: custom:card-templater
entities:
- vacuum.roborock_og
card:
type: custom:xiaomi-vacuum-map-card
entity: vacuum.roborock_og
language: de
map_source:
camera: camera.roborock_og_map
calibration_source:
camera: true
map_modes:
- template: vacuum_clean_zone_predefined
predefined_selections_template: >-
{%- set map = states.camera.roborock_og_map %}
{%- if map is defined and not map is none %}
{%- set data = namespace(rooms=[]) %}
{%- for roomid in state_attr(map.entity_id, "rooms") -%}
{%- set room = map.attributes.rooms[roomid] %}
{%- set roomlst = [] %}
{%- set roomlst = roomlst + [room['x0'],room['y0'],room['x1'],room['y1']] %}
{%- set data.rooms = data.rooms + [ { 'zones':[ roomlst ]} ] %}
{%- endfor -%}
{{ data.rooms }}
{% endif %}
- template: vacuum_clean_zone
- template: vacuum_goto
- template: vacuum_follow_path