Barma-lej / halandroid

Worx Landroid package for Home Assistant based on Landroid Cloud by @MTrab
MIT License
112 stars 49 forks source link

Mower_zone does not match input options #56

Closed Driekes closed 2 years ago

Driekes commented 2 years ago

I get the error when setting [input_select.mower_zone] Invalid option: 7 (possible options: 0, 1, 2, 3)

This relates to the fact that Landroid is reporting mowing in zone 7 (it shows 1 in the app). Not sure where this difference is coming from, maybe because I added and removed zones at some point.

MTrab commented 2 years ago

There are 4 zones, split into 10 virtual zones. It's the virtual zones the API reports, but you have to ask for one of the 4 available zones.

Driekes commented 2 years ago

@MTrab how is that conversion done?

MTrab commented 2 years ago

Each of the virtual zones represent a 10% probability (10 virtual zones) So if zone 1 probability is 20%, 2 of the 10 virtual zones will correspond to zone 1

Driekes commented 2 years ago

@MTrab is that automatically the first 2 then? Or can that order be in any way?

MTrab commented 2 years ago

As of now, it's the 2 first. That will be changed to more evenly distributed in a future release.

Driekes commented 2 years ago

Ok, but at least it is feedback to the package yaml of @Barma-lej

  # Get mower zone
  - service: input_select.select_option
    target:
      entity_id: input_select.mower_zone
    data:
      option: "{{ state_attr('sensor.landroid_mower_status','mowing_zone') }}"