multiple esphome device updates and new devices
This commit is contained in:
@@ -28,7 +28,8 @@ substitutions:
|
||||
api_key: !secret esp-api_key # unfortunately you can't use substitutions inside secrets names
|
||||
ota_pass: !secret esp-ota_pass # unfortunately you can't use substitutions inside secrets names
|
||||
static_ip_address: !secret esp-underhouselights_ip
|
||||
mqtt_main_command_topic: !secret mqtt_main_command_topic
|
||||
mqtt_local_command_main_topic: !secret mqtt_local_command_main_topic
|
||||
mqtt_local_status_main_topic: !secret mqtt_local_status_main_topic
|
||||
|
||||
# Device Settings
|
||||
log_level: "ERROR" # Define logging level: NONE, ERROR, WARN, INFO, DEBUG (Default), VERBOSE, VERY_VERBOSE
|
||||
@@ -36,7 +37,8 @@ substitutions:
|
||||
|
||||
# MQTT Controls
|
||||
mqtt_device_name: "underhouse-lights-control"
|
||||
mqtt_main_topic: "${mqtt_main_command_topic}/${mqtt_device_name}" # Topic we will use to command stuff from external without HA
|
||||
mqtt_local_command_topic: "${mqtt_local_command_main_topic}/${mqtt_device_name}" # Topic we will use to command this locally without HA
|
||||
mqtt_local_status_topic: "${mqtt_local_status_main_topic}/${mqtt_device_name}" # Topic we will use to view status locally without HA
|
||||
|
||||
# Switch Naming
|
||||
switch_1_name: "Underhouse Entrance Lights"
|
||||
@@ -54,12 +56,13 @@ substitutions:
|
||||
|
||||
##########################################################################################
|
||||
# PACKAGES: Included Common Packages
|
||||
# https://esphome.io/components/esphome.html
|
||||
# https://esphome.io/components/packages.html
|
||||
##########################################################################################
|
||||
packages:
|
||||
common_wifi: !include
|
||||
file: common/network_common.yaml
|
||||
vars:
|
||||
local_device_name: "${device_name}"
|
||||
local_static_ip_address: "${static_ip_address}"
|
||||
local_ota_pass: "${ota_pass}"
|
||||
common_api: !include
|
||||
@@ -70,6 +73,8 @@ packages:
|
||||
# file: common/webportal_common.yaml
|
||||
common_mqtt: !include
|
||||
file: common/mqtt_common.yaml
|
||||
vars:
|
||||
local_device_name: "${device_name}"
|
||||
common_sntp: !include
|
||||
file: common/sntp_common.yaml
|
||||
common_general_sensors: !include
|
||||
@@ -252,12 +257,40 @@ status_led:
|
||||
mqtt:
|
||||
on_message:
|
||||
# Relay 1 control
|
||||
- topic: "${mqtt_main_topic}/relay1/set"
|
||||
- topic: "${mqtt_local_command_topic}/relay1/set"
|
||||
payload: "ON"
|
||||
then:
|
||||
- switch.turn_on: relay1
|
||||
- topic: "${mqtt_main_topic}/relay1/set"
|
||||
- topic: "${mqtt_local_command_topic}/relay1/set"
|
||||
payload: "OFF"
|
||||
then:
|
||||
- switch.turn_off: relay1
|
||||
# Relay 2 control
|
||||
- topic: "${mqtt_local_command_topic}/relay2/set"
|
||||
payload: "ON"
|
||||
then:
|
||||
- switch.turn_on: relay2
|
||||
- topic: "${mqtt_local_command_topic}/relay2/set"
|
||||
payload: "OFF"
|
||||
then:
|
||||
- switch.turn_off: relay2
|
||||
# Relay 3 control
|
||||
- topic: "${mqtt_local_command_topic}/relay3/set"
|
||||
payload: "ON"
|
||||
then:
|
||||
- switch.turn_on: relay3
|
||||
- topic: "${mqtt_local_command_topic}/relay3/set"
|
||||
payload: "OFF"
|
||||
then:
|
||||
- switch.turn_off: relay3
|
||||
# Relay 4 control
|
||||
- topic: "${mqtt_local_command_topic}/relay4/set"
|
||||
payload: "ON"
|
||||
then:
|
||||
- switch.turn_on: relay4
|
||||
- topic: "${mqtt_local_command_topic}/relay4/set"
|
||||
payload: "OFF"
|
||||
then:
|
||||
- switch.turn_off: relay4
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user