Thanks for clarifying will try after i update to hassOS. Im still using hassbian
This is an awesome integration, one thing I can’t figure out Is how to display what stations are queued?
Is this possible?
I have two Opensprinklers. Is there a way to have both integrated using your component? I tried adding both IP’s to the configuration file, but that did not work.
No easy way at the moment, someone had some luck by making a copy of the folder and changing part of the code, ie have another folder called hass_opensprinkler2
and using hass_opensprinkler2:
in the config for the second device.
Another option is to try the integration I am trying to get into HA, the config is different.
Integration PR: https://github.com/home-assistant/core/pull/34146 (copy the files into custom_components
folder
Doc PR: https://github.com/home-assistant/home-assistant.io/pull/12953
Note I haven’t tried it as a custom component yet but I think it should work
Thank you. I took the first option and made that work. That will also be a simple change back when your integration is ready.
Another option is to integrate Remote Home Assistant and integrate the other OpenSprinkler into the second slave HA. See more here: Master HA instance with multiple slaves
Hi all, newbie here …I’m looking to replace my old-school dumb controller with a smart controller…I think I’m leaning towards opensprinkler…altho I’m somewhat worried about how wife-friendly it will be. Once it’s all set up can it feed through to HomeKit in a nice usable way? Can you refer to the zones by name…like “hey Siri, turn on the sprinklers in the back yard” or, say, adhoc timed watering like “hey Siri, water the flower beds for 7 minutes”?
Thx
EDIT:
Oh my God, all this is in the examples…
Questions on setting up manual zone operations. I’m trying to do the following. I can get it to work by hard coding an integer value for run_seconds but I’d rather use an input_number slider for versatility. Two questions:
- How can I have the input_number slider be in minutes and convert it into seconds for the service?
- How do I pass the input_number slider value as an argument into the opensprinkler.run service? I’ve tried:
service_data:
entity_id: sensor.front_1_4_n_station_status
run_seconds: '{{ states(''input_number.front_1_4_n_timer'') | int }}'
but it throws Failed to call service opensprinkler/run. expected a list for dictionary value @ data['run_seconds']
and
service_data_tempalte:
entity_id: sensor.front_1_4_n_station_status
run_seconds: '{{ states(''input_number.front_1_4_n_timer'') | int }}'
but it throws Failed to call service opensprinkler/run. must contain at least one of entity_id, area_id.
My card:
entities:
- action_name: Run zone
icon: 'mdi:sprinkler'
name: Front 1/4 (N)
service: opensprinkler.run
service_data:
entity_id: sensor.front_1_4_n_station_status
run_seconds:
- input_number.front_1_4_n_timer
type: call-service
- entity: input_number.front_1_4_n_timer
title: Run Once Program
type: entities
I could only get it working with input_number
by converting it to a float then and int, take a look at a README on https://github.com/vinteo/hass-opensprinkler, there is an example there.
Your second example has a typo, service_data_tempalte
-> service_data_template
I tried the second option and only have the sensor entities in HA. How can I get also the switch entities?
Update to the latest version 1.0.x with at least 0.110 of HA and it has multiple device support.
Please read the upgrade info in the README.
It works perfectly now. Thanks!
Hello… I can’t figure out how to manually run my zones. I’ve been stuck for days !
Running latest OpenSprinkler (the one that supports MQTT) with the latest integration installed from HACS.
I keep getting this error when clicking the Run Zone link :
Failed to call service opensprinkler/run. expected int @ data[‘run_seconds’][0]
Here is my card :
and my code :
entities:
- entity: switch.s01_station_enabled
- entity: binary_sensor.s01_station_running
- entity: sensor.s01_station_status
- entity: input_number.runtime_zone1
name: Runtime
type: 'custom:slider-entity-row'
- action_name: Run zone
icon: 'mdi:sprinkler'
name: Zone 1
service: opensprinkler.run
service_data:
entity_id: switch.s01_station_enabled
run_seconds:
- '{{ ((states("input_number.runtime_zone1") | float) * 60) | int }}'
type: call-service
title: Zone 1
type: entities
Any help would be greatly appreciated !
Thanks
When targeting a single station the run_seconds
should be a single integer so change:
run_seconds:
- '{{ ((states("input_number.runtime_zone1") | float) * 60) | int }}'
to
run_seconds: '{{ ((states("input_number.runtime_zone1") | float) * 60) | int }}'
Thanks.
I now get a slightly different error but one that I have seen before in my many different prior attempts.
Failed to call service opensprinkler/run. expected a list for dictionary value @ data['run_seconds']
I think it has to do with the single quotes. I know the formula return the right value and if I just plug a hard coded number there, it works.
But when I remove the single quotes and save, I get this error :
Failed to call service opensprinkler/run. Run seconds should be an integer value for station
and when I go back in my code, the line has been replaced by :
'[object Object]': null
Try switch the quotes around so:
run_seconds: "{{ ((states('input_number.runtime_zone1') | float) * 60) | int }}"
Same thing.
I get this error :
Failed to call service opensprinkler/run. expected a list for dictionary value @ data['run_seconds']
and why I go back to edit my code, it was replaced with this :
run_seconds: '{{ ((states(''input_number.runtime_zone1'') | float) * 60) | int }}'
I read something about creating a sensor ? Or a template ? Not sure which…
I just realised you are doing it in the lovelace ui, I don’t think that supports templates. So you need to create a script
and call that.
Go to Configuration
-> Scripts
to add a new script. For the sequence edit as YAML (select “Edit as YAML” from the … dropdown) and add:
data_template:
run_seconds: "{{ ((states('input_number.runtime_zone1') | float) * 60) | int }}"
entity_id: switch.s01_station_enabled
service: opensprinkler.run
then your UI config should be (assuming you named your script “Run Zone 1”):
...
- action_name: Run zone
icon: 'mdi:sprinkler'
name: Zone 1
entity: script.run_zone_1
Wow ! Thanks so much ! It’s finally working !!