Closed mkmilamk closed 2 years ago
Remove lines from 13 to 125 in /config/packages/landroid.yaml
Hello
I removed lines, still error
I do not know if you mean number of line with empty lines on begin or without. Up is width, next is without.
Best regards
Miloslav Kothera
Dne 28.03.2022 v 12:19 Barma-lej napsal(a):
Remove lines from 13 to 125 in /config/packages/landroid.yaml
— Reply to this email directly, view it on GitHub https://github.com/Barma-lej/halandroid/issues/39#issuecomment-1080467759, or unsubscribe https://github.com/notifications/unsubscribe-auth/AX4AVGTMJF4IG3XRITPPOBDVCGBUFANCNFSM5R2H37MQ. You are receiving this because you authored the thread.Message ID: @.***>
You can copy source from here and paste into /config/packages/landroid.yaml
Hello,
my be I now, where is problem.
When I dovnloaded landroid.yaml from github, inside is html text (see attachment). When I open landroid.yaml on github and copy text to empty landroid.yaml, configuration is without errors (see attachment). Is it now landroid.yaml correct?
Best regards
Miloslav Kothera
Dne 28.03.2022 v 12:19 Barma-lej napsal(a):
Remove lines from 13 to 125 in /config/packages/landroid.yaml
— Reply to this email directly, view it on GitHub https://github.com/Barma-lej/halandroid/issues/39#issuecomment-1080467759, or unsubscribe https://github.com/notifications/unsubscribe-auth/AX4AVGTMJF4IG3XRITPPOBDVCGBUFANCNFSM5R2H37MQ. You are receiving this because you authored the thread.Message ID: @.***>
Worx Landroid (M500 WR141E) package
https://github.com/Barma-lej/halandroid
Based on Landroid Cloud by @MTrab
https://github.com/MTrab/landroid_cloud
landroid_cloud: email: !secret mower_mail password: !secret mower_pass
recorder: exclude: entities:
#- swith.mower_mowing
#- swith.mower_home
#- swith.mower_edgecut
#- swith.mower_partymode
#- swith.mower_lock
# Sensors ###############
- sensor.landroid_front_ip
#- sensor.mower_bladetime
#- sensor.mower_current bladetime
#- sensor.mower_totaltime
#- sensor.mower_distance
#- sensor.mower_lastupdate
#- sensor.mower_wifi
#- sensor.mower_yaw
#- sensor.mower_roll
#- sensor.mower_pitch
# Input selects #########
- input_select.mower_zone
# Input numbers #########
- input_number.mower_raindelay
- input_number.mower_timeextension
- input_number.mower_zone0_distance
- input_number.mower_zone1_distance
- input_number.mower_zone2_distance
- input_number.mower_zone3_distance
- input_number.mower_zone0_probability
- input_number.mower_zone1_probability
- input_number.mower_zone2_probability
- input_number.mower_zone3_probability
# Input booleans ########
- input_boolean.mower_sched_settings
- input_boolean.mower_info_toggle
- input_boolean.mower_zone_enable
- input_boolean.mower_view_config
- input_boolean.mower_view_setzones
# Automations ######
- automation.mower_notify_status
- automation.mower_notify_error
- automation.mower_sync_values
- automation.mower_views_switch
# Scripts ##########
- script.mower_set_config
- script.mower_setzone
- script.mower_setzones
- script.mower_views_toggle
logbook: exclude: entities:
#- swith.mower_mowing
#- swith.mower_home
#- swith.mower_edgecut
#- swith.mower_partymode
#- swith.mower_lock
# Sensors ###############
- sensor.mower_ip
#- sensor.mower_bladetime
#- sensor.mower_current bladetime
#- sensor.mower_totaltime
#- sensor.mower_distance
#- sensor.mower_lastupdate
#- sensor.mower_wifi
#- sensor.mower_yaw
#- sensor.mower_roll
#- sensor.mower_pitch
# Input selects #########
- input_select.mower_zone
# Input numbers #########
- input_number.mower_raindelay
- input_number.mower_timeextension
- input_number.mower_zone0_distance
- input_number.mower_zone1_distance
- input_number.mower_zone2_distance
- input_number.mower_zone3_distance
- input_number.mower_zone0_probability
- input_number.mower_zone1_probability
- input_number.mower_zone2_probability
- input_number.mower_zone3_probability
# Input booleans ########
- input_boolean.mower_sched_settings
- input_boolean.mower_info_toggle
- input_boolean.mower_zone_enable
- input_boolean.mower_view_config
- input_boolean.mower_view_setzones
# Automations ######
- automation.mower_notify_status
- automation.mower_notify_error
- automation.mower_sync_values
- automation.mower_views_switch
# Scripts ##########
- script.mower_set_config
- script.mower_setzone
- script.mower_setzones
- script.mower_views_toggle
switch:
platform: template switches: mower_mowing: unique_id: mower_mowing value_template: "{{ is_state_attr('sensor.landroid_mower_status', 'status_id', 7) }}" turn_on: service: landroid_cloud.start data: id: "{{ state_attr('sensor.landroid_mower_status','id') }}" turn_off: service: landroid_cloud.pause data: id: "{{ state_attr('sensor.landroid_mower_status','id') }}" icon_template: >- {% if is_state_attr('sensor.landroid_mower_status', 'status_id', 2) or is_state_attr('sensor.landroid_mower_status', 'status_id', 3) or is_state_attr('sensor.landroid_mower_status', 'status_id', 4) or is_state_attr('sensor.landroid_mower_status', 'status_id', 5) or is_state_attr('sensor.landroid_mower_status', 'status_id', 6) or is_state_attr('sensor.landroid_mower_status', 'status_id', 7) or is_state_attr('sensor.landroid_mower_status', 'status_id', 30) or is_state_attr('sensor.landroid_mower_status', 'status_id', 32) or is_state_attr('sensor.landroid_mower_status', 'status_id', 33) %} mdi:pause {% else %} mdi:play {% endif %} mower_home: unique_id: mower_home value_template: >- {{ is_state_attr('sensor.landroid_mower_status', 'status_id', 4) or is_state_attr('sensor.landroid_mower_status', 'status_id', 5) or is_state_attr('sensor.landroid_mower_status', 'status_id', 6) or is_state_attr('sensor.landroid_mower_status', 'status_id', 30) }} turn_on: service: landroid_cloud.home data: id: "{{ state_attr('sensor.landroid_mower_status','id') }}" turn_off: service: landroid_cloud.pause data: id: "{{ state_attr('sensor.landroid_mower_status','id') }}" icon_template: >- {% if is_state_attr('sensor.landroid_mower_status', 'status_id', 1) %} mdi:home {% else %} mdi:home-import-outline {% endif %}
mower_edgecut: unique_id: mower_edgecut value_template: "{{ is_state_attr('sensor.landroid_mower_status', 'status_id', 32) }}" turn_on: service: landroid_cloud.edgecut data: id: "{{ state_attr('sensor.landroid_mower_status','id') }}" turn_off: service: landroid_cloud.pause data: id: "{{ state_attr('sensor.landroid_mower_status','id') }}" icon_template: >- {% if is_state_attr('sensor.landroid_mower_status', 'status_id', 32) %} mdi:motion-pause {% else %} mdi:motion-play {% endif %}
# {% if is_state_attr('sensor.landroid_mower_status', 'status_id', 32) %}
# /local/mower/cut-to-edge-on.png
# {% else %}
# /local/mower/cut-to-edge.png
# {% endif %}
mower_partymode: unique_id: mower_partymode value_template: "{{ is_state_attr('sensor.landroid_mower_status', 'partymode_enabled', true) }}" turn_on: service: landroid_cloud.partymode data: id: "{{ state_attr('sensor.landroid_mower_status','id') }}" enable: true turn_off: service: landroid_cloud.partymode data: id: "{{ state_attr('sensor.landroid_mower_status','id') }}" enable: false icon_template: >- {% if is_state_attr('sensor.landroid_mower_status', 'partymode_enabled', true) %} mdi:sleep-off {% else %} mdi:sleep {% endif %}
mower_lock: unique_id: mower_lock value_template: "{{ is_state_attr('sensor.landroid_mower_status', 'locked', true) }}" turn_on: service: landroid_cloud.lock data: id: "{{ state_attr('sensor.landroid_mower_status','id') }}" enable: true turn_off: service: landroid_cloud.lock data: id: "{{ state_attr('sensor.landroid_mower_status','id') }}" enable: false icon_template: >- {% if is_state_attr('sensor.landroid_mower_status', 'locked', true) %} mdi:lock {% else %} mdi:lock-open-variant {% endif %}
template:
sensor:
name: Mower IP unique_id: mower_ip state: !secret mower_ip icon: mdi:ip-network
name: Mower bladetime unique_id: mower_bladetime state: "{{ state_attr('sensor.landroid_mower_status', 'total_blade_time') }}" icon: mdi:fan unit_of_measurement: "min" attributes: time_formatted: > {% set t = state_attr("sensor.landroid_mower_status", "total_blade_time") | int(0) %} {% if t != 0 %} {{ "%0d Tg. %0.02d Std. %0.02d Min." | format(t // 1440, ((t % 1440) // 60), t % 60) }} {%- else -%} {{ '0 min' }} {% endif %}
name: Mower current bladetime unique_id: mower_current_bladetime state: "{{ state_attr('sensor.landroid_mower_status', 'current_blade_time') }}" icon: mdi:fan unit_of_measurement: "min" attributes: time_formatted: > {% set t = state_attr("sensor.landroid_mower_status", "current_blade_time") | int(0) %} {% if t != 0 %} {{ "%0d Tg. %0.02d Std. %0.02d Min." | format(t // 1440, ((t % 1440) // 60), t % 60) }} {%- else -%} {{ '0 min' }} {% endif %}
name: Mower totaltime unique_id: mower_totaltime state: "{{ state_attr('sensor.landroid_mower_status', 'work_time') }}" icon: mdi:bus-clock unit_of_measurement: "min" attributes: time_formatted: > {% set t = state_attr("sensor.landroid_mower_status", "work_time") | int(0) %} {% if t != 0 %} {{ "%0d Tg. %0.02d Std. %0.02d Min." | format(t // 1440, ((t % 1440) // 60), t % 60) }} {%- else -%} {{ '0 min' }} {% endif %}
name: Mower distance unique_id: mower_distance state: "{{ (state_attr('sensor.landroid_mower_status', 'distance') | float(0)) / 1000 }}" icon: mdi:map-marker-distance unit_of_measurement: "km"
name: Mower lastupdate unique_id: mower_lastupdate state: "{{ as_timestamp( strptime( state_attr('sensor.landroid_mower_status', 'last_update'), '%H:%M:%S %d/%m/%Y', 0), 0) | timestamp_custom('%d.%m.%Y %H:%M:%S') }}" icon: mdi:clock
name: Mower WIFI unique_id: mower_wifi state: "{{ state_attr('sensor.landroid_mower_status', 'rssi') }}" device_class: signal_strength unit_of_measurement: "dBm" icon: >- {% set strength = state_attr("sensor.landroid_mower_status", "rssi") | float(0) -%} {%- if strength > -56 -%}mdi:wifi-strength-4 {% elif strength > -67 -%}mdi:wifi-strength-3 {% elif strength > -78 -%}mdi:wifi-strength-2 {% elif strength > -89 -%}mdi:wifi-strength-1 {%- else -%}mdi:wifi-strength-outline {%- endif %}
name: Mower yaw unique_id: mower_yaw state: "{{ state_attr('sensor.landroid_mower_status', 'yaw') }}" icon: mdi:axis-z-rotate-clockwise unit_of_measurement: "°"
name: Mower roll unique_id: mower_roll state: "{{ state_attr('sensor.landroid_mower_status', 'roll') }}" icon: mdi:axis-x-rotate-clockwise unit_of_measurement: "°"
name: Mower pitch unique_id: mower_pitch state: "{{ state_attr('sensor.landroid_mower_status', 'pitch') }}" icon: mdi:seat-flat-angled unit_of_measurement: "°"
input_select: mower_zone: name: Mower zone initial: "0" options:
input_number: mower_raindelay: name: Rain delay initial: 150 min: 0 max: 300 step: 30 unit_of_measurement: "min" icon: mdi:weather-lightning-rainy
mower_timeextension: name: Time extension initial: 0 min: -100 max: 100 step: 10 unit_of_measurement: "%" icon: mdi:clock-out
mower_zone0_distance: name: "Zone 0: Distance" initial: 0 min: 0 max: 1000 step: 1 unit_of_measurement: "m" icon: mdi:numeric-0-box-outline mower_zone1_distance: name: "Zone 1: Distance" initial: 0 min: 0 max: 1000 step: 1 unit_of_measurement: "m" icon: mdi:numeric-1-box-outline mower_zone2_distance: name: "Zone 2: Distance" initial: 0 min: 0 max: 1000 step: 1 unit_of_measurement: "m" icon: mdi:numeric-2-box-outline mower_zone3_distance: name: "Zone 3: Distance" initial: 0 min: 0 max: 1000 step: 1 unit_of_measurement: "m" icon: mdi:numeric-3-box-outline
mower_zone0_probability: name: "Zone 0: Probability" initial: 0 min: 0 max: 100 step: 10 unit_of_measurement: "%" icon: mdi:numeric-0-circle-outline mower_zone1_probability: name: "Zone 1: Probability" initial: 0 min: 0 max: 100 step: 10 unit_of_measurement: "%" icon: mdi:numeric-1-circle-outline mower_zone2_probability: name: "Zone 2: Probability" initial: 0 min: 0 max: 100 step: 10 unit_of_measurement: "%" icon: mdi:numeric-2-circle-outline mower_zone3_probability: name: "Zone 3: Probability" initial: 0 min: 0 max: 100 step: 10 unit_of_measurement: "%" icon: mdi:numeric-3-circle-outline
input_boolean:
mower_sched_settings: name: Scheduler settings initial: false icon: mdi:timer
mower_info_toggle: name: Info toggle initial: false icon: mdi:information
mower_zone_enable: name: Enable multizone initial: false icon: mdi:vector-difference
mower_view_config: name: Configuration icon: mdi:tools mower_view_setzones: name: Multizone icon: mdi:vector-difference
automation:
id: mower_notify_status alias: Mower Notify Status initial_state: false trigger:
condition:
action:
id: mower_notify_error alias: Mower Notify Error initial_state: true trigger:
condition:
action:
id: mower_sync_values alias: Mower sync values trigger:
platform: homeassistant event: start
platform: state entity_id: sensor.mower_lastupdate
action:
script: mower_set_config: alias: Mower set rain delay and time extension sequence: service: landroid_cloud.config data: id: "{{ state_attr('sensor.landroid_mower_status','id') }}" raindelay: "{{ states('input_number.mower_raindelay') | int(0) }}" timeextension: "{{ states('input_number.mower_timeextension') | int(0) }}"
mower_setzone: alias: Mower set mowing zone mode: restart sequence:
service: input_select.select_next target: entity_id: input_select.mower_zone
delay: "00:00:03"
service: landroid_cloud.setzone data: id: "{{ state_attr('sensor.landroid_mower_status','id') }}" zone: "{{ states('input_select.mower_zone') | int(0) }}"
mower_setzones: alias: Mower set multizone distances sequence: service: landroid_cloud.config data: id: "{{ state_attr('sensor.landroid_mower_status','id') }}" multizone_distances: >- {% if is_state('input_boolean.mower_zone_enable', 'on') -%} [{{ states('input_number.mower_zone0_distance') | int(0) }}, {{ states('input_number.mower_zone1_distance') | int(0) }}, {{ states('input_number.mower_zone2_distance') | int(0) }}, {{ states('input_number.mower_zone3_distance') | int(0) }}] {%- else -%} [0,0,0,0] {%- endif %} multizone_probabilities: >- {% if is_state('input_boolean.mower_zone_enable', 'on') -%} [{{ ((states('input_number.mower_zone0_probability') | int(0)) / 10) | round(0) }}, {{ ((states('input_number.mower_zone1_probability') | int(0)) / 10) | round(0) }}, {{ ((states('input_number.mower_zone2_probability') | int(0)) / 10) | round(0) }}, {{ ((states('input_number.mower_zone3_probability') | int(0)) / 10) | round(0) }}] {%- else -%} [0,0,0,0] {%- endif %} mower_views_toggle: description: "View configuration panel like tabs" mode: restart fields: entity_id: description: "Current switch" example: "input_boolean.mower_view_config" sequence:
service: input_boolean.turn_off data: entity_id: > {% for item in states["input_boolean"] if item.object_id.startswith("mowerview") and item.entity_id != entity_id -%} {% if not loop.first %},{% endif %}{{ item.entity_id }} {%- endfor %}
service: input_boolean.turn_on data: entity_id: "{{ entity_id }}"
Is it now landroid.yaml correct?
Yes
thank you,
I apologize, that I am so stupid, that I thaut, that in yaml file coud be html code.
Best regards
Miloslav Kothera
Dne 28.03.2022 v 17:36 Barma-lej napsal(a):
Is it now landroid.yaml correct?
Yes
— Reply to this email directly, view it on GitHub https://github.com/Barma-lej/halandroid/issues/39#issuecomment-1080806832, or unsubscribe https://github.com/notifications/unsubscribe-auth/AX4AVGXCHJAUQTIYSQWSK6TVCHGYHANCNFSM5R2H37MQ. You are receiving this because you authored the thread.Message ID: @.***>
Hello Barma-lej
at first thanks for your great work! Every think is working fine without setup from my multizone If I select a zone number, then I get this script error: script/mower_setzone can only concatenate str(not "int") to str...
Can you or any other person here help me?
I use Home Assistant 2022.4.0
Can I ask, please, for solution of this error? I made every step of installation and after checking of configuration I got this error. "Error loading /config/configuration.yaml: mapping values are not allowed here in "/config/packages/landroid.yaml", line 25, column 67" Thank you.