From 25e6f3cef2e54c96e4575cf91bc22d20cb111962 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Klein?= Date: Tue, 10 Sep 2024 22:14:47 +0200 Subject: [PATCH] =?UTF-8?q?Revert=20"Change=20the=20device=20class=20of=20?= =?UTF-8?q?the=20smart=20sensor=20from=20humidity=20to=20moisture=E2=80=A6?= =?UTF-8?q?"=20(#227)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 0c89d7259d6d50c3d748703502e1548a8afcebb1. --- README.md | 30 +++++++++---------- RECIPES.md | 30 +++++++++---------- .../gardena_smart_system/sensor.py | 2 +- 3 files changed, 31 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index aa61d3a..6f54ad5 100644 --- a/README.md +++ b/README.md @@ -47,13 +47,13 @@ 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.** +**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 ! +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 : +Here are the links if you want to show your support : PayPal donate button ## Installation @@ -64,7 +64,7 @@ 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. +Then find the Gardena Smart System integration in HACS and install it. Restart Home Assistant! @@ -73,9 +73,9 @@ Install the new integration through *Configuration -> Integrations* in HA (see b ### Manual installation -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. +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. +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 @@ -144,16 +144,16 @@ The following devices are supported : ### Smart Mower services -`vacuum.start` -Start the mower using the Gardena API command START_SECONDS_TO_OVERRIDE. +`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. +`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. +`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. ### Smart System general @@ -170,8 +170,8 @@ Checks if service is connected or disconnected `sensor.sensor_light_intensity` Read the light intensity of a smart sensor. Only V1 of the Smart Sensor supports this. -`sensor.sensor_soil_moisture` -Read the soil moisture of a smart sensor. This can help automate your Water control / Irrigation Controller. +`sensor.sensor_soil_humidity` +Read the soil humidity of a smart sensor. This can help automate your Water control / Irrigation Controller. `sensor.sensor_soil_temperature` Read the soil tempature. @@ -189,7 +189,7 @@ Read the battery level of a smart sensor. ### Smart Irigation Control services `switch.irrigation_control_valve_X` -Open or close a valve to start watering . Irrigation control can have up to 6 valves and inherits the original name of each valve from the Gardena app. If a valve is not connected, the service for the specific valve is unavailable. +Open or close a valve to start watering . Irrigation control can have up to 6 valves and inherits the original name of each valve from the Gardena app. If a valve is not connected, the service for the specific valve is unavailable. diff --git a/RECIPES.md b/RECIPES.md index 797e349..f9cd4c4 100644 --- a/RECIPES.md +++ b/RECIPES.md @@ -47,17 +47,17 @@ The problem of Gardena automation for lawn irrigation is that this ... entity_id: sensor.garden_sensor_ambient_temperature above: 5 - condition: numeric_state - entity_id: sensor.garden_sensor_soil_moisture + entity_id: sensor.garden_sensor_soil_humidity below: 10 action: - service: timer.start entity_id: timer.timer.lawn_irrigation_garden - service: switch.turn_on entity_id: switch.garden_water_control - - delay: 0:12:00 + - delay: 0:12:00 - service: switch.turn_off entity_id: switch.garden_water_control - - delay: 0:60:00 + - delay: 0:60:00 - service: switch.turn_on entity_id: switch.garden_water_control - delay: 0:24:00 @@ -67,7 +67,7 @@ The problem of Gardena automation for lawn irrigation is that this ... - service: switch.turn_on entity_id: switch.garden_water_control - delay: 0:24:00 - - service: switch.turn_off + - service: switch.turn_off ``` ## Notification over [HomeAssistant Companion App](https://companion.home-assistant.io/) or as [Telegram Messenger](https://www.home-assistant.io/integrations/telegram/) message or over [Amazon Alexa with the help of Alexa Media Player Integration](https://github.com/custom-components/alexa_media_player) @@ -85,7 +85,7 @@ It is not possible to get this notifications over Amazon Alexa from the App 4. [Gardena Smart Sensor](https://www.gardena.com/de/produkte/bewasserung/bewasserungssteuerung/smart-sensor/967044801/) or other sensors for depending values 5. [Gardena Pipeline System](https://www.gardena.com/de/produkte/bewasserung/pipelines/) 6. (optional) [Telegram Messenger Integration](https://www.home-assistant.io/integrations/telegram/) -7. (optional) [Alexa Media Player Integration](https://github.com/custom-components/alexa_media_player) you can find and install this Integration over HACS +7. (optional) [Alexa Media Player Integration](https://github.com/custom-components/alexa_media_player) you can find and install this Integration over HACS ### Configuration: only needed for Telegram @@ -104,21 +104,21 @@ only needed for Telegram data: data: type: announce - target: + target: - media_player.radio_livingroom - message: "Watering in the garden has started. The moisture is currently {{ states.sensor.garden_sensor_moisture.state }}% the temperature is now {{ states.sensor.garden_sensor_temperature.state }}°C" + message: "Watering in the garden has started. The humidity is currently {{ states.sensor.garden_sensor_humidity.state }}% the temperature is now {{ states.sensor.garden_sensor_temperature.state }}°C" - service: notify.telegram_[you Telegram channel] data_template: title: '*Watering in the garden has started!*' - message: "Watering in the garden has started. The moisture is currently {{ states.sensor.garden_sensor_moisture.state }}% the temperature is now {{ states.sensor.garden_sensor_temperature.state }}°C -> https://[public HA URL]/lovelace/terrasse" + message: "Watering in the garden has started. The humidity is currently {{ states.sensor.garden_sensor_humidity.state }}% the temperature is now {{ states.sensor.garden_sensor_temperature.state }}°C -> https://[public HA URL]/lovelace/terrasse" data: inline_keyboard: - 'Stop watering:/stopwateringgarden' - ' Stop for 3 hours:/stopwateringgarden3h, Stop for 24 hours:/stopwateringgarden24h' - + - id: 'telegram_stop_watering_garden' alias: 'Telegram Stop watering garden' - + trigger: platform: event event_type: telegram_callback @@ -197,22 +197,22 @@ only needed for Telegram - service: notify.notify data: title: "Watering Garden" - message: "Watering in the garden has ended" + message: "Watering in the garden has ended" - service: notify.alexa_media data: data: type: announce - target: + target: - media_player.radio_wohnzimmer - message: "Watering in the garden has ended. The moisture is now {{ states.sensor.garden_sensor_moisture.state }}%" + message: "Watering in the garden has ended. The humidity is now {{ states.sensor.garden_sensor_humidity.state }}%" - service: notify.telegram_[you Telegram channel] data_template: title: '*Watering in the garden has ended!*' - message: "Watering in the garden has ended. The moisture is now {{ states.sensor.garden_sensor_moisture.state }}% -> https://[public HA URL]/lovelace/terrasse" + message: "Watering in the garden has ended. The humidity is now {{ states.sensor.garden_sensor_humidity.state }}% -> https://[public HA URL]/lovelace/terrasse" ``` ## Use a NFC tag to start and stop mowing -Normaly my Gardena Irrigation Control works per automations, but in a part of situations i have to start/stop it manualy (i.e. I will fill a pot with water) in this cases i have before use my Smartphone open the App search for the Watercontroll entity and start/stop this. +Normaly my Gardena Irrigation Control works per automations, but in a part of situations i have to start/stop it manualy (i.e. I will fill a pot with water) in this cases i have before use my Smartphone open the App search for the Watercontroll entity and start/stop this. Now with the [NFC tag integration](https://companion.home-assistant.io/docs/integrations/universal-links/) from HomeAssistant thats is more easy than befor, now i’m scan with my Smartphone an tag on my Hose trolley and give the okay that the tag starts the HA App and the water control starts if it's off and stopps if it's on. diff --git a/custom_components/gardena_smart_system/sensor.py b/custom_components/gardena_smart_system/sensor.py index 3332516..c306de5 100644 --- a/custom_components/gardena_smart_system/sensor.py +++ b/custom_components/gardena_smart_system/sensor.py @@ -26,7 +26,7 @@ "mdi:thermometer", SensorDeviceClass.TEMPERATURE, ], - "soil_moisture": ["%", "mdi:water-percent", SensorDeviceClass.MOISTURE], + "soil_humidity": ["%", "mdi:water-percent", SensorDeviceClass.HUMIDITY], ATTR_BATTERY_LEVEL: [PERCENTAGE, "mdi:battery", SensorDeviceClass.BATTERY], }