{% if prerelease %}
{% endif %}
Feel free to join the discord server :
Custom component to support Gardena Smart System devices.
Table of Contents
- About
- Installation
- Configuration
- Supported devices
- Services
- Recipes
- Development
- Changelog
- Development
⚠️ Starting from version 1.0.0b5: You might probably have to uninstall and reinstall the integration as credentials requirements and method has changed. THERE IS A BREAKING CHANGE IN THE CONFIGURATION DUE TO AN UPDATE ON THE GARDENA API
This component is originally based on https://github.com/grm/home-assistant/tree/feature/smart_gardena and https://github.com/grm/py-smart-gardena
The integration / component has been changed quite a lot, mainly to add support for config flow setup and Home Assistant devices. It has also been cleaned up and some bugs have been fixed. Gardena devices are now represented as Home Assistant devices, which have battery level sensors where applicable.
This project needs your support.
Gardena equipments are expensive, and I need to buy them in order to add support.
If you find this library useful and want to help me support more devices (or if you
just want to reward me for my spent time), you are very welcome !
Your help is very much appreciated.
Here are the links if you want to show your support :
Requires Home Assistant 0.115.0 or newer.
If you have not yet installed HACS, go get it at https://hacs.xyz/ and walk through the installation and configuration.
Then find the Gardena Smart System integration in HACS and install it.
Restart Home Assistant!
Install the new integration through Configuration -> Integrations in HA (see below).
Copy the sub-path /hass-gardena-smart-system/custom_components/gardena_smart_system
of this repo into the path /config/custom_components/gardena_smart_system
of your HA installation.
Alternatively use the following commands within an SSH shell into your HA system.
Do NOT try to execute these commands directly your PC on a mounted HA file system. The resulting symlink would be broken for the HA file system.
cd /config
git clone https://github.com/py-smart-gardena/hass-gardena-smart-system.git
# if folder custom_components does not yet exist:
mkdir custom_components
cd custom_components
ln -s ../hass-gardena-smart-system/custom_components/gardena_smart_system
Setup under Integrations in Home Assistant, search for "Gardena Smart System". You need to enter your application key / client ID and your applications secret / client secret. See below for how to get your Gardena application key and secret.
After setting up the integration, you can adjust some options on the integration panel for it.
Even though this integration can be installed and configured via the Home Assistant GUI (uses config flow), you might have to restart Home Assistant to get it working.
In order to use this integration you must get a client ID / Application Key from Gardena/Husqvarna.
-
Create an account if needed, otherwise sign in with your Gardena account.
-
After signing in you will be automatically redirected to "Your applications". (Otherwise go to: https://developer.husqvarnagroup.cloud/apps)
-
Create an new application, name it for example "My Home Assistant" (doesn't matter), leave the other fields empty.
-
Click on "+Connect new API" and connect the Authentication API and the GARDENA smart system API.
-
Copy your Application Key and Application secret, this is what you need when you add the integration in Home Assistant.
The following devices are supported :
- Gardena Smart Irrigation Control (as switch)
- Gardena Smart Mower (as vacuum)
- Gardena Smart Sensor (as sensor)
- Gardena Smart Water Control (as switch)
- Gardena Smart Power Socket (as switch)
[TODO: document services]
vacuum.start
Start the mower using the Gardena API command START_SECONDS_TO_OVERRIDE.
The mower switches to manual operation for a defined duration of time. The duration is taken from the integration option "Mower Duration (minutes)" (see Configuration -> Integrations in HA).
vacuum.stop
Stop the mower using the Gardena API command PARK_UNTIL_FURTHER_NOTICE.
The mower cancels the current operation, returns to charging station and ignores schedule.
vacuum.return_to_base
Stop the mower using Gardena API command PARK_UNTIL_NEXT_TASK.
The mower cancels the current operation and returns to charging station. It will reactivate with the next schedule.
[TODO: document services]
[TODO: document services]
[TODO: document services]
Some recipes were made by the community. You can find them here.
To enable debug logging for this integration and related libraries you
can control this in your Home Assistant configuration.yaml
file. Example:
logger:
default: info
logs:
custom_components.gardena_smart_system: debug
custom_components.gardena_smart_system.mower : debug
custom_components.gardena_smart_system.sensor : debug
custom_components.gardena_smart_system.switch : debug
custom_components.gardena_smart_system.config_flow : debug
gardena: debug
gardena.smart_system: debug
websocket: debug
After a restart detailed log entries will appear in /config/home-assistant.log
.
- Update credentials requirements : the integration need to be completely removed from home assistant and resintalled
- Correct a bug with some mowers where the wrong id was chosen
- Correct a bug with the water pump where the wrong id was chosen
- Integration to default repositories of HACS
- Rename vaccum attributes for mower as described :
Two attributes added. Both are compiled from existing attributes:
error code
contains NONE if there is no error and the code fromlast error code
if an error is active.status code
contains a copy ofactivity
as long as there is no error and a copy oferror code
if an error is active. This corresponds to the state in the old integration of Wijnand.- Attribute names changed: last_error_code -> last_error, error_code -> error, status_code -> state
- Const ATTR_LAST_ERROR_CODE removed, not used any more.
- First release with a version number
- Bump py-smart-gardena to 0.7.4
- Connection stability has been improved from updating py-smart-gardena
- A binary_sensor has been added which holds the websocket connection status (its status goes offline a few seconds from time to time when the access token expires while the access token is refreshed)
To enable debug logging for this integration and related libraries you
can control this in your Home Assistant configuration.yaml
file. Example:
logger:
default: info
logs:
custom_components.gardena_smart_system: debug
custom_components.gardena_smart_system.mower : debug
custom_components.gardena_smart_system.sensor : debug
custom_components.gardena_smart_system.switch : debug
custom_components.gardena_smart_system.config_flow : debug
gardena: debug
gardena.smart_system: debug
websocket: debug
After a restart detailed log entries will appear in /config/home-assistant.log
.
- Do we need support for more than one location? Should we make it possible to configure it?