{"id":13579771,"url":"https://github.com/vinteo/hass-opensprinkler","last_synced_at":"2025-05-16T16:08:43.203Z","repository":{"id":29283353,"uuid":"120696364","full_name":"vinteo/hass-opensprinkler","owner":"vinteo","description":"OpenSprinkler Integration for Home Assistant","archived":false,"fork":false,"pushed_at":"2024-11-17T23:10:12.000Z","size":271,"stargazers_count":222,"open_issues_count":26,"forks_count":40,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-04-12T14:59:04.122Z","etag":null,"topics":["hacktoberfest","hacs","home-assistant","home-automation","opensprinkler"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vinteo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-02-08T01:52:05.000Z","updated_at":"2025-03-01T06:05:31.000Z","dependencies_parsed_at":"2023-01-14T14:35:24.333Z","dependency_job_id":"41dd611c-099e-4ed4-94ea-b8d343b17b68","html_url":"https://github.com/vinteo/hass-opensprinkler","commit_stats":{"total_commits":200,"total_committers":21,"mean_commits":9.523809523809524,"dds":"0.42000000000000004","last_synced_commit":"9a3fc31884e09f04fca27bd69c2ad9fed5b1c1d2"},"previous_names":[],"tags_count":58,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinteo%2Fhass-opensprinkler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinteo%2Fhass-opensprinkler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinteo%2Fhass-opensprinkler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinteo%2Fhass-opensprinkler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vinteo","download_url":"https://codeload.github.com/vinteo/hass-opensprinkler/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254564127,"owners_count":22092122,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest","hacs","home-assistant","home-automation","opensprinkler"],"created_at":"2024-08-01T15:01:42.927Z","updated_at":"2025-05-16T16:08:43.187Z","avatar_url":"https://github.com/vinteo.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# OpenSprinkler Integration for Home Assistant\n\n![Version](https://img.shields.io/github/v/release/vinteo/hass-opensprinkler?label=version)\n[![hacs_badge](https://img.shields.io/badge/HACS-Default-orange.svg)](https://github.com/hacs/integration)\n![HACS Build](https://github.com/vinteo/hass-opensprinkler/workflows/HACS/badge.svg)\n![HASS Build](https://github.com/vinteo/hass-opensprinkler/workflows/hassfest/badge.svg)\n![Linting](https://github.com/vinteo/hass-opensprinkler/workflows/Linting/badge.svg)\n[![CodeQL](https://github.com/vinteo/hass-opensprinkler/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/vinteo/hass-opensprinkler/actions/workflows/codeql-analysis.yml)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=vinteo_hass-opensprinkler\u0026metric=alert_status)](https://sonarcloud.io/summary/new_code?id=vinteo_hass-opensprinkler)\n\nLast tested on OS API `2.2.0` and Home Assistant `2024.2.0`\n\n## Features\n\n- Binary sensors for station and programs to show running state\n- Sensors for each station to show status\n- Sensors for water level, last runtime and rain delay stop time\n- Switches for each program and station to enable/disable program or station\n- Switch to enable/disable OpenSprinkler controller operation\n- Actions to run and stop stations\n- Action to run programs\n- Actions to pause, set a rain delay, and set the water level.\n\nTo have a Lovelace card for the UI, [opensprinkler-card](https://github.com/rianadon/opensprinkler-card) can be used.\n\n## Installation\n\n1. Install using [HACS](https://github.com/custom-components/hacs). Or install manually by copying `custom_components/opensprinkler` folder into `\u003cconfig_dir\u003e/custom_components`\n2. Restart Home Assistant.\n3. In the Home Assistant UI, navigate to `Configuration` then `Integrations`. Click on the add integration button at the bottom right and select `OpenSprinkler`. Fill out the options and save.\n   - URL - Should be in the form of `http://\u003cip or host\u003e:\u003cport\u003e`. The port can be omitted unless you have changed it, as the default port for OpenSprinkler is `80`. SSL (HTTPS) is also supported.\n   - Password - The OpenSprinkler controller password.\n   - Verify SSL Certificate - If the integration should verify the certificate from an HTTPS server. Generally, this should be left checked.\n   - MAC Address - MAC address of the device. This is only required for firmware below 2.1.9 (4), otherwise it can be left blank.\n   - Controller Name - The name of the device that appears in Home Assistant.\n\n### Upgrading from pre 1.0.0\n\nNote: _1.0.0 has major breaking changes, you will need to update any automations, scripts, etc_\n\n1. Remove YAML configuration.\n2. Uninstall using HACS or delete the `hass_opensprinkler` folder in `\u003cconfig_dir\u003e/custom_components`\n3. Restart Home Assistant\n4. Follow installation instructions above\n\n#### Breaking Changes\n\n- Program binary sensors now show running state instead of operation state. Please use the program switch states for program operation state.\n- Controller binary sensor is removed. Please use controller switch state for controller operation state.\n- Station switches now enable/disable instead of run/stop stations. Please use `opensprinkler.run_station` and `opensprinkler.stop` actions to run and stop stations.\n- All scenes are removed. Please use the `opensprinkler.run_program` action to run programs.\n\n## Using Actions\n\nAvailable actions are `opensprinkler.run_program`, `opensprinkler.run_station`, and `opensprinkler.run_once`\nto start a program, station, or controller (multiple stations) respectively, and `opensprinkler.stop` to stop one or all stations.\n\nNote: The action `opensprinkler.run` is deprecated and will be removed in a future release. Please migrate to one of the above actions,\nwhich use the same parameters.\n\n### Run Examples\n\nNote: If using a version of Home Assistant prior to 2024.8, substitute the keyword `service` for `action` in the following examples.\n\n#### Run Program Example\n\n```yaml\naction: opensprinkler.run_program\ntarget:\n  entity_id: switch.standard_schedule_program_enabled # Any program enabled switch\ndata: {}\n```\n\n#### Run Station Example\n\n```yaml\naction: opensprinkler.run_station\ndata:\n  run_seconds: 600 # Number of seconds to run the station. Optional, defaults to 60 seconds.\ntarget:\n  entity_id: switch.front_yard_station_enabled # Any station enabled switch\n  ```\n\n#### Run Once Program Example\n\nTo run a number of stations at once, use `opensprinkler.run_once`. The run seconds can either be a list of seconds per station\nor a list or dict of index and seconds pairs.\nThe following examples are all equivalent.\n\n```yaml\naction: opensprinkler.run_once\ntarget:\n  entity_id: switch.opensprinkler_enabled # Controller enabled switch\ndata:\n  run_seconds: # List of seconds to run for each station (required)\n    - 60\n    - 0\n    - 30\n```\n\n```yaml\naction: opensprinkler.run_once\ntarget:\n  entity_id: switch.opensprinkler_enabled # Controller enabled switch\ndata:\n  run_seconds: # List of station index and run seconds pairs (required)\n    - index: 0\n      run_seconds: 60\n    - index: 2\n      run_seconds: 30\n```\n\n```yaml\naction: opensprinkler.run_once\ntarget:\n  entity_id: switch.opensprinkler_enabled # Controller enabled switch\ndata:\n  run_seconds: # Dictionary of station index and run seconds key/value pairs (required)\n    \"0\": 60\n    \"2\": 30\n```\n\nCalling `opensprinkler.run_once` or `opensprinkler.run_program` will stop all other stations that are running.\nWhen using `opensprinkler.run_once`, you can set `continue_running_stations` to true to allow the stations to\ncontinue running. This only works when specifying the run seconds in index/seconds pairs.\n\n```yaml\naction: opensprinkler.run_once\ntarget:\n  entity_id: switch.opensprinkler_enabled # Controller enabled switch\ndata:\n  continue_running_stations: true # Keep running stations running (optional, defaults to false)\n  run_seconds:\n    - index: 0\n      run_seconds: 60\n    - index: 2\n      run_seconds: 30\n```\n\n```yaml\naction: opensprinkler.run_once\ntarget:\n  entity_id: switch.opensprinkler_enabled # Controller enabled switch\ndata:\n  continue_running_stations: true # Keep running stations running (optional, defaults to false)\n  run_seconds:\n    \"0\": 60\n    \"2\": 30\n```\n\n### Stop Examples\n\n#### Stop Station Example\n\n```yaml\naction: opensprinkler.stop\ndata: {}\ntarget:\n  entity_id: switch.drip_station_enabled # Any station enabled switch\n```\n\n#### Stop All Stations Example\n\n```yaml\naction: opensprinkler.stop\ndata: {}\ntarget:\n  entity_id: switch.opensprinkler_enabled # Controller enabled switch\n  ```\n\n### Set Water Level Example\n\nThis sets the water level to 50%, i.e. all stations will run half of their normally configured time.\n\n```yaml\naction: opensprinkler.set_water_level\ndata:\n  water_level: 50\ntarget:\n  entity_id: switch.opensprinkler_enabled # Controller enabled switch\n```\n\n### Set Rain Delay Example\n\nThis sets the rain delay of the controller to 6 hours, i.e. all stations will stop and programs will not run until the rain delay time is over.\n\n```yaml\naction: opensprinkler.set_rain_delay\ndata:\n  rain_delay: 6\ntarget:\n  entity_id: switch.opensprinkler_enabled # Controller enabled switch\n```\n\n### Pause Example\n\nThis pauses the station runs for 10 minutes (600 seconds), resuming afterwards.\n\n```yaml\naction: opensprinkler.pause_stations\ndata:\n  pause_duration: 600\ntarget:\n  entity_id: switch.opensprinkler_enabled # Controller enabled switch\n```\n\n### Reboot Controller Example\n\nThis reboots the controller.\n\n```yaml\naction: opensprinkler.reboot\ndata: {}\ntarget:\n  entity_id: switch.opensprinkler_enabled # Controller enabled switch\n```\n\n## Creating a Station Switch\n\nIf you wish to have a switch for your stations, here is an example using the switch template and input number.\nAdd the following to your YAML configuration (`configuration.yaml`).\n\n```yaml\nswitch:\n  - platform: template\n    switches:\n      fruits_station:\n        value_template: \"{{ is_state('binary_sensor.front_yard_station_running', 'on') }}\"\n        turn_on:\n          action: opensprinkler.run_station\n          target:\n            entity_id: switch.front_yard_station_enabled\n            # Run seconds uses the input_number below.\n          data:\n            run_seconds: \"{{ ((states('input_number.front_yard_station_minutes') | float) * 60) | int }}\"\n        turn_off:\n          service: opensprinkler.stop\n          target:\n            entity_id: switch.front_yard_station_enabled\n​\ninput_number:\n  front_yard_station_minutes:\n    initial: 1\n    min: 1\n    max: 10\n    step: 1\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvinteo%2Fhass-opensprinkler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvinteo%2Fhass-opensprinkler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvinteo%2Fhass-opensprinkler/lists"}