Husqvarna Automower monitoring

Could someone please explain what files I need to put where?
I tried to download the .zip-file and put them in the homeassistant directory but I just got a bunch of error messages saying I need to make sure all dependencies are installed and
No module named 'custom_components.automower.vacuum'; 'custom_components.automower' is not a package

It also told me to change the file names of
vacuum/automower.py to automower/vacuum.py
and
device_tracker/automower.py to automower/device_tracker.py
but after that I got the same message regarding dependencies and also
Unable to find platform automower. Search path was limited to path of component: custom_components

What dependencies do I need to install? It’s not that clear in the error message…

I ran into the same issue myself, but after some trying I got it working placing the files like this :

custom_components/automower/__init__.py
custom_components/automower/device_tracker.py
custom_components/automower/vacuum.py

(do you know which files Im referring to above)

Niklas

This: Husqvarna Automower monitoring

Thanks,

If I take the files from the Git is it suppose to be like this then:

git: homeassistant/components/automower.py -> custom_components/automower/__init__.py
git: homeassistant/components/device_tracker/automower.py -> custom_components/automower/device_tracker.py
git: homeassistant/components/vacuum/automower.py -> custom_components/automower/vacuum.py

@Christian_Hollbjar yeah I tried that but I’m a bit confused to exactly which files he meant.

Yeah, that should do it :slight_smile:

1 Like

F****** amazing, it works now. Thank you! :smiley:

1 Like

In my switch: section I added this:

  - platform: template
    switches:
      automower_switch:
        entity_id: vacuum.automower_420
        value_template: "{{ is_state('vacuum.automower_420', 'on') }}"
        turn_on:
          service: vacuum.turn_on
          data:
            entity_id: vacuum.automower_420
        turn_off:
          service: vacuum.turn_off
          data:
            entity_id: vacuum.automower_420

To sync it too Google Home as a switch. But when I say “OK Google, stop lawn mower” it only pauses it. What service do I need to call to make it go back home to the charging station?

EDIT: I should have looked around a bit more. I changed it to vacuum.return_to_base instead of vacuum.turn_off

you do know that you can talk to Automower without HA? just say “OK Google, Talk to Automower”

Did not know that. Thank you for that! However I want it in HA so I can link it with my sprinkler system so my sprinklers wont start when the Automower is out.

2 Likes

Hi, After updating to latest hass.io 0.93 this beautiful integration stopped working for me.

Mine works.

After having restarted 3 times hass.io it is now working again :slight_smile:

What errors did you see?
I have just bought a Husqvarna automower, so I have just setup the hass integration. I get an error saying that the vacuum and device_tracker could not be set up.
I have followed these instructions:

git: homeassistant/components/automower.py -> custom_components/automower/__init__.py
git: homeassistant/components/device_tracker/automower.py -> custom_components/automower/device_tracker.py
git: homeassistant/components/vacuum/automower.py -> custom_components/automower/vacuum.py

You also need to edit device_tracker.py and vacuum.py from:
from homeassistant.components.automower import DOMAIN as AUTOMOWER_DOMAIN
to:
from custom_components.automower import DOMAIN as AUTOMOWER_DOMAIN

Do’h. I thought I saw something like that in the thread earlier, but I could not find it.

Thanks! it is working now :smiley:

For any other new users, I went ahead and packaged up everything and wrote some installation instructions. You can download it here:

3 Likes

Great, thanks! Would you mind (re)creating it as a Github fork of my repo? Seeing the full history of changes as well as the updates you made will be helpful in the future as we (or others) may work on integrating this into HA core.

1 Like

I would like to further development on this such as programming the mower when to mow via home assistant

Just use automation then.

exactly right from home assistant