Do you plan to generate a vacuum as well, e.g. mine here
- platform: template
vacuums:
mahroboter_husqvarna_330x:
friendly_name: "Mähroboter Husqvarna 330x"
unique_id: unique_id_mahroboter_husqvarna_330x
value_template: |
{% if is_state("sensor.mahroboter_status_raw", "0") %}
idle
{% elif is_state("sensor.mahroboter_status_raw", "1") %}
docked
{% elif is_state("sensor.mahroboter_status_raw", "2") %}
cleaning
{% elif is_state("sensor.mahroboter_status_raw", "3") %}
returning
{% elif is_state("sensor.mahroboter_status_raw", "4") %}
docked
{% elif is_state("sensor.mahroboter_status_raw", "5") %}
cleaning
{% elif is_state("sensor.mahroboter_status_raw", "7") %}
error
{% elif is_state("sensor.mahroboter_status_raw", "8") %}
error
{% elif is_state("sensor.mahroboter_status_raw", "16") %}
docked
{% elif is_state("sensor.mahroboter_status_raw", "17") %}
docked
{% elif is_state("sensor.mahroboter_status_raw", "18") %}
idle
{% else %}
error
{% endif %}
battery_level_template: "{{ states('sensor.mahroboter_batterie')|int(default=0) }}"
start:
service: script.rasenmahersteuerung_robonect
data:
message: start
stop:
service: script.rasenmahersteuerung_robonect
data:
message: stop
return_to_base:
service: script.rasenmahersteuerung_robonect
data:
message: eod
locate:
service: script.rasenmahersteuerung_robonect
data:
message: auto
attribute_templates:
substatus: "{{ states('sensor.mahroboter_substatus_raw') }}: {{ states('sensor.mahroboter_substatus_plain') }}"
status: "{{ states('sensor.mahroboter_status_raw') }}: {{ states('sensor.mahroboter_status_plain') }}"
Secondly Robonect delivers a Status Raw and a Status Plain, but the Plain is nur usefull, esp. not wanted in some cases.
For this I (and several others) created another template sensor, to have a “better”, additional plain.
See here
The first is the raw and is showing 4, but the plain devices in 1% steps of loading, whereas I like to show only loading (and then perhaps more details somewhere else). Same for returning to home base and searching
where plain devides to m and I’m most of the time only interesting in a text for 5 “searching”.
Long story short, can you add such template as sensor of the device as well, with additional “better” plain, like shown above and here.
- sensor:
- name: Mähroboter Status lesbar
unique_id: unique_id_mahroboter_status_lesbar
state: >
{% if is_state("sensor.mahroboter_status_raw", "0") %}
Erkenne Status
{% elif is_state("sensor.mahroboter_status_raw", "1") %}
Parkt
{% elif is_state("sensor.mahroboter_status_raw", "2") %}
Mäht
{% elif is_state("sensor.mahroboter_status_raw", "3") %}
Fährt heim
{% elif is_state("sensor.mahroboter_status_raw", "4") %}
Lädt
{% elif is_state("sensor.mahroboter_status_raw", "5") %}
Sucht
{% elif is_state("sensor.mahroboter_status_raw", "7") %}
Fehler
{% elif is_state("sensor.mahroboter_status_raw", "8") %}
Schleifensignal verloren
{% elif is_state("sensor.mahroboter_status_raw", "16") %}
Aus
{% elif is_state("sensor.mahroboter_status_raw", "17") %}
Schläft
{% elif is_state("sensor.mahroboter_status_raw", "18") %}
Wartet_auf_Garagentor
{% else %}
Versuche herauszufinden was {{ states("sensor.mahroboter_status_raw") }} bedeutet
{% endif %}
icon: mdi:list-status
Ofc I can use such templates still, if you are not providing them, but because of the limitations, this is then not part of the device.