Create an automation for attribute (zone) of mower - landroid cloud integration

Hello, how can i crate an automation for zone?
This is shown in developer tools - state of mower - zone: current: 0 (is changing).

zone:
current: 0 (this change, when mower is in station, when i use the multizone)
index: 4
indicies:
- 0
- 1
- 2
- 3
- 0
- 1
- 3
- 1
- 3
- 3
starting_point:
- 3
- 40
- 42
- 43

I create this - see yaml code, but it is not working.

automation:
alias: Mähzone 1 - EIN
description: “”
trigger:

platform: state
entity_id:
- vacuum.mower
to: "current: 0" (i also tried this) to: 0
id: Mähzone 1
attribute: zone
condition: []
action:
conditions:
- condition: trigger
id: Mähzone 1
sequence:
- service: switch.turn_on
data: {}
target:
entity_id:
- switch.mahzonen_8ch
- switch.tasmota_f4cfa26e9f35_switch_relay_4

Thanks for helping.

1 Like

It works now.
I create a template sensor
{{ state_attr(‘vacuum.mower’, ‘zone’) [‘current’] }}

1 Like

can you please exacly explain how you create the template sensor? I need some help

This is the config in sensors.yaml

  • platform: template
    sensors:
    maehzone_next:
    friendly_name: “Landroid_Mähzone_next”
    value_template: “{{ state_attr(‘vacuum.mower’, ‘zone’) [‘current’] +1 }}”
1 Like

Thank you so much. This was the missing key…