Check-In iSpindel config for HomeAssistant.
This commit is contained in:
parent
2bd12374fc
commit
c98aebc716
@ -1,22 +1,25 @@
|
|||||||
- alias: Set BK Input Value
|
alias: Send iSpindel
|
||||||
|
description: ""
|
||||||
trigger:
|
trigger:
|
||||||
platform: mqtt
|
- platform: state
|
||||||
topic: "brewery/sensor/boil_kettle"
|
entity_id: sensor.ispindel001_gravity,sensor.ispindel002_gravity
|
||||||
|
condition: []
|
||||||
action:
|
action:
|
||||||
service: input_select.select_option
|
- service: rest_command.send_ispindel
|
||||||
data:
|
data:
|
||||||
entity_id: input_select.boil_kettle_pwm
|
name: "{{ device_attr(device_id(trigger.entity_id), \"name\") }}"
|
||||||
option: "{{ trigger.payload.setpoint }}"
|
temp: >-
|
||||||
|
{% macro sensor(n,s) -%}sensor.{{ device_attr(device_id(n), "name") |
|
||||||
# This automation script runs when the thermostat mode selector is changed.
|
lower }}_{{s}}{%- endmacro %}
|
||||||
# It publishes its value to the same MQTT topic it is also subscribed to.
|
{{states(sensor(trigger.entity_id,"temperature"))}}
|
||||||
- alias: Set BK PWM
|
temp_unit: C
|
||||||
trigger:
|
gravity: >-
|
||||||
platform: state
|
{% macro sensor(n,s) -%}sensor.{{ device_attr(device_id(n), "name") |
|
||||||
entity_id: input_select.boil_kettle_pwm
|
lower }}_{{s}}{%- endmacro %}
|
||||||
action:
|
{{states(sensor(trigger.entity_id,"gravity"))}}
|
||||||
service: mqtt.publish
|
gravity_unit: P
|
||||||
data:
|
battery: >-
|
||||||
topic: "brewery/setpoint/bk"
|
{% macro sensor(n,s) -%}sensor.{{ device_attr(device_id(n), "name") |
|
||||||
retain: true
|
lower }}_{{s}}{%- endmacro %}
|
||||||
payload: "setpoint: {{ states('input_select.thermostat_mode') }}"
|
{{states(sensor(trigger.entity_id,"battery_voltage"))}}
|
||||||
|
mode: single
|
||||||
|
5
home_assistant/rest_command.yaml
Normal file
5
home_assistant/rest_command.yaml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
send_ispindel:
|
||||||
|
url: !secret BrewfatherEndpoint
|
||||||
|
method: POST
|
||||||
|
content_type: "application/json"
|
||||||
|
payload: '{ "name":"{{ name }}", "temp":{{ temp }}, "temp_unit":"F", "gravity":{{ gravity }}, "gravity_unit": "P", "battery": {{ battery }} }'
|
Loading…
Reference in New Issue
Block a user