Move stuff that doesn't belong to Arduino.
This is just reference for setting up home assistant later.
This commit is contained in:
parent
43133e6c20
commit
18538e2e87
@ -1,44 +1,8 @@
|
||||
/** Home Assitant Sensor
|
||||
sensor:
|
||||
- platform: mqtt
|
||||
name: "boil_kettle_setpoint"
|
||||
state_topic: "brewery/sensor/boil_kettle"
|
||||
unit_of_measurement: {{ value_json.units }}
|
||||
value_template: "{{ value_json.setpoint }}"
|
||||
*/
|
||||
|
||||
/**Home Assistant Automation
|
||||
- alias: Set BK Input Value
|
||||
trigger:
|
||||
platform: mqtt
|
||||
topic: "brewery/sensor/boil_kettle"
|
||||
action:
|
||||
service: input_select.select_option
|
||||
data:
|
||||
entity_id: input_select.boil_kettle_pwm
|
||||
option: "{{ trigger.payload.setpoint }}"
|
||||
|
||||
# This automation script runs when the thermostat mode selector is changed.
|
||||
# It publishes its value to the same MQTT topic it is also subscribed to.
|
||||
- alias: Set BK PWM
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: input_select.boil_kettle_pwm
|
||||
action:
|
||||
service: mqtt.publish
|
||||
data:
|
||||
topic: "brewery/setpoint/bk"
|
||||
retain: true
|
||||
payload: "setpoint: {{ states('input_select.thermostat_mode') }}"
|
||||
|
||||
*/
|
||||
|
||||
#include <ArduinoJson.h>
|
||||
#include <Arduino.h>
|
||||
#include <SPI.h>
|
||||
#include <Ethernet.h>
|
||||
#include <MQTT.h>
|
||||
//#include <MQTTClient.h>
|
||||
#include <LiquidCrystal_I2C.h>
|
||||
#include <LiquidMenu.h>
|
||||
#include <Button.h>
|
||||
|
22
home_assistant/automation.yaml
Normal file
22
home_assistant/automation.yaml
Normal file
@ -0,0 +1,22 @@
|
||||
- alias: Set BK Input Value
|
||||
trigger:
|
||||
platform: mqtt
|
||||
topic: "brewery/sensor/boil_kettle"
|
||||
action:
|
||||
service: input_select.select_option
|
||||
data:
|
||||
entity_id: input_select.boil_kettle_pwm
|
||||
option: "{{ trigger.payload.setpoint }}"
|
||||
|
||||
# This automation script runs when the thermostat mode selector is changed.
|
||||
# It publishes its value to the same MQTT topic it is also subscribed to.
|
||||
- alias: Set BK PWM
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: input_select.boil_kettle_pwm
|
||||
action:
|
||||
service: mqtt.publish
|
||||
data:
|
||||
topic: "brewery/setpoint/bk"
|
||||
retain: true
|
||||
payload: "setpoint: {{ states('input_select.thermostat_mode') }}"
|
6
home_assistant/sensor.yaml
Normal file
6
home_assistant/sensor.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
sensor:
|
||||
- platform: mqtt
|
||||
name: "boil_kettle_setpoint"
|
||||
state_topic: "brewery/sensor/boil_kettle"
|
||||
unit_of_measurement: {{ value_json.units }}
|
||||
value_template: "{{ value_json.setpoint }}"
|
Loading…
Reference in New Issue
Block a user