-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add documentation, improve the readme, change the default timer for s…
…cheduling, add custom card for homeassistant instructions
- Loading branch information
1 parent
b87d1cf
commit 11e22ed
Showing
12 changed files
with
198 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#automation for watering system: | ||
#automation: | ||
- id: 'automated_watering' | ||
alias: watering 1 | ||
trigger: | ||
platform: template | ||
value_template: "{{ states('sensor.time') == states('sensor.water_time_1') }}" | ||
condition: | ||
condition: template | ||
value_template: > | ||
{% set today = 'input_boolean.wateringweekday_' ~ now().strftime("%a") | lower ~ '_1' %} | ||
{{ is_state('input_boolean.wateringstatus_1', 'on') and is_state(today, 'on') }} | ||
action: | ||
- service: switch.turn_on | ||
entity_id: switch.bomba_riego | ||
- delay: "{{ states('input_number.wateringduringminutes_1') | multiply(60) | int }}" | ||
- service: switch.turn_off | ||
entity_id: switch.bomba_riego |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
input_boolean: !include input_boolean.yaml | ||
input_number: !include input_number.yaml | ||
sensor: !include sensor.yaml | ||
mqtt: !include mqtt_draco_watering.yaml | ||
automation: !include automation.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#watering system | ||
#input_boolean: | ||
wateringstatus_1: | ||
name: Water Station 1 | ||
icon: mdi:water-pump | ||
wateringweekday_mon_1: | ||
name: Monday | ||
icon: mdi:calendar | ||
wateringweekday_tue_1: | ||
name: Tuesday | ||
icon: mdi:calendar | ||
wateringweekday_wed_1: | ||
name: Wednesday | ||
icon: mdi:calendar | ||
wateringweekday_thu_1: | ||
name: Thursday | ||
icon: mdi:calendar | ||
wateringweekday_fri_1: | ||
name: Friday | ||
icon: mdi:calendar | ||
wateringweekday_sat_1: | ||
name: Saturday | ||
icon: mdi:calendar | ||
wateringweekday_sun_1: | ||
name: Sunday | ||
icon: mdi:calendar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#watering system | ||
#input_number: | ||
wateringhourstart_1: | ||
name: Hour | ||
min: 00 | ||
max: 23 | ||
step: 1 | ||
icon: mdi:clock-start | ||
wateringminutesstart_1: | ||
name: Minutes | ||
min: 00 | ||
max: 59 | ||
step: 1 | ||
wateringduringminutes_1: | ||
name: Watering time [min] | ||
min: 00 | ||
max: 5 | ||
step: 1 | ||
icon: mdi:water-sync |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
#lovelace UI for watering card | ||
type: vertical-stack | ||
cards: | ||
- type: entities | ||
entities: | ||
- entity: input_boolean.wateringstatus_1 | ||
name: Mode | ||
- entity: sensor.water_time_1 | ||
name: Water Time | ||
- entity: input_number.wateringhourstart_1 | ||
- entity: input_number.wateringminutesstart_1 | ||
- entity: input_number.wateringduringminutes_1 | ||
title: Riego | ||
show_header_toggle: false | ||
- type: horizontal-stack | ||
cards: | ||
- type: button | ||
tap_action: | ||
action: toggle | ||
hold_action: | ||
action: none | ||
show_icon: true | ||
show_name: true | ||
entity: input_boolean.wateringweekday_mon_1 | ||
name: Mon | ||
icon_height: 40px | ||
- type: button | ||
tap_action: | ||
action: toggle | ||
hold_action: | ||
action: none | ||
show_icon: true | ||
show_name: true | ||
entity: input_boolean.wateringweekday_tue_1 | ||
name: Tue | ||
icon_height: 40px | ||
- type: button | ||
tap_action: | ||
action: toggle | ||
hold_action: | ||
action: none | ||
show_icon: true | ||
show_name: true | ||
entity: input_boolean.wateringweekday_wed_1 | ||
name: Wed | ||
icon_height: 40px | ||
- type: button | ||
tap_action: | ||
action: toggle | ||
hold_action: | ||
action: none | ||
show_icon: true | ||
show_name: true | ||
entity: input_boolean.wateringweekday_thu_1 | ||
name: Thu | ||
icon_height: 40px | ||
- type: button | ||
tap_action: | ||
action: toggle | ||
hold_action: | ||
action: none | ||
show_icon: true | ||
show_name: true | ||
entity: input_boolean.wateringweekday_fri_1 | ||
name: Fri | ||
icon_height: 40px | ||
- type: button | ||
tap_action: | ||
action: toggle | ||
hold_action: | ||
action: none | ||
show_icon: true | ||
show_name: true | ||
entity: input_boolean.wateringweekday_sat_1 | ||
name: Sat | ||
icon_height: 40px | ||
- type: button | ||
tap_action: | ||
action: toggle | ||
hold_action: | ||
action: none | ||
show_icon: true | ||
show_name: true | ||
entity: input_boolean.wateringweekday_sun_1 | ||
name: Sun | ||
icon_height: 40px |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
#watering system | ||
#mqtt: | ||
switch: | ||
- unique_id: draco_waterpump | ||
name: "Bomba riego" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
How to create a custom card in home assistant | ||
======================= | ||
Modify the configuration.yaml and add all the files .yaml except lovelace_watering.yaml, that it the yaml code that you have to introduce in a custom card in the UI of homeassistant |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#watering system | ||
#sensor: | ||
- platform: template | ||
sensors: | ||
water_time_1: | ||
friendly_name: 'Water Time 1' | ||
value_template: "{{'{:02d}:{:02d}'.format(states('input_number.wateringhourstart_1') | int, states('input_number.wateringminutesstart_1') | int) }}" | ||
|
||
- platform: time_date | ||
display_options: | ||
- 'time' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
How to configure a systemd service | ||
======================= | ||
.. code:: shell | ||
$ cp draco.service ~/.config/systemd/user/draco.service | ||
$ systemctl --user enable draco.service |
This file was deleted.
Oops, something went wrong.