Move stuff that doesn't belong to Arduino.

This is just reference for setting up home assistant later.
This commit is contained in:
Chris Giacofei 2022-01-11 09:42:12 -05:00
parent 43133e6c20
commit 18538e2e87
3 changed files with 28 additions and 36 deletions

View File

@ -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>

View 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') }}"

View 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 }}"