/
food-dispenser.yaml
58 lines (49 loc) · 1.71 KB
/
food-dispenser.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
substitutions:
device_name: taubenfutterspender
device_friendly_name: Taubenfutterspender
device_area: Hof
status_led_pin: GPIO2
esphome:
name: ${device_name}
friendly_name: ${device_friendly_name}
area: ${device_area}
project:
name: "ThomDietrich.Food-Dispenser_ESP32-C3-StampC3U"
version: "1.2"
packages:
system: !include system/stamp_c3u.yaml
wifi: !include common/wifi.yaml
general: !include common/general.yaml
status_led: !include include/on_board_status_led_sk6812.yaml
include_1: !include include/food_dispenser_hardware.yaml
include_2: !include include/food_dispenser_entities.yaml
include_3: !include include/food_dispenser_output_script.yaml
# Manual IP overwrite
# wifi:
# use_address: 192.168.23.106
api:
services:
#
# Home Assistant Service
#
# timeout_sec: Max duration in seconds to prevent damages in case of clogging or similar.
# You should choose a meaningful timeout (e.g. 2x normal duration) to act as a safeguard in case of issues.
#
# target_g: Output target mass. Expect the result to slightly overshoot (see offset_g).
# Set to 9999 if you want to work with a fixed duration via timeout_sec.
#
# offset_g: Correction to the provided target output to prevent overshooting.
# You have to identify this value over the course of a few trial runs.
# Internal target = target_g - offset_g
#
- service: output
variables:
timeout_sec: int
target_g: int
offset_g: int
then:
- script.execute:
id: script_controlled_output
timeout_sec: !lambda 'return timeout_sec;'
target_g: !lambda 'return target_g;'
offset_g: !lambda 'return offset_g;'