pmb 6 button switch now V1.1
This commit is contained in:
@@ -20,10 +20,10 @@
|
|||||||
# OPERATION (as at V1.1)
|
# OPERATION (as at V1.1)
|
||||||
# 1. Buttons 1-3: These toggle a virtual relay (v_relay1 to 3) and also turn on the
|
# 1. Buttons 1-3: These toggle a virtual relay (v_relay1 to 3) and also turn on the
|
||||||
# associated LED when pressed. Inputs are debounced.
|
# associated LED when pressed. Inputs are debounced.
|
||||||
# 2. Button 4: As with buttons1-3,but also if double pressed, the v_relay only
|
# 2. Button 4: As with buttons 1-3,but also if double pressed, the v_relay only
|
||||||
# stays on for a short period (default 30s) then switches off. The LED fast flashes.
|
# stays on for a short period (default 30s) then switches off. The LED fast flashes.
|
||||||
# If it is held down, it stays on for longer (1hr default) and the LED slow flashes.
|
# If it is held down, it stays on for longer (1hr default) and the LED slow flashes.
|
||||||
# 3. Button 5: As with Buttons1-3 BUT if double pressed, a different v_relay switches on
|
# 3. Button 5: As with Buttons 1-3 BUT if double pressed, a different v_relay switches on
|
||||||
# (5B) and the LED slowly pulses. If held down for 2 seconds, a 3rd v_relay switches
|
# (5B) and the LED slowly pulses. If held down for 2 seconds, a 3rd v_relay switches
|
||||||
# on (5C) and the LED fast pulses. The 3 v_relays are exclusive, only one can be
|
# on (5C) and the LED fast pulses. The 3 v_relays are exclusive, only one can be
|
||||||
# on at a time.
|
# on at a time.
|
||||||
@@ -33,13 +33,13 @@
|
|||||||
# 6. Power Loss: LEDs and v_relays are restored on power loss (restore settings saved
|
# 6. Power Loss: LEDs and v_relays are restored on power loss (restore settings saved
|
||||||
# every 10s). If v_relay4 was turned on with a timer (double press or hold), the
|
# every 10s). If v_relay4 was turned on with a timer (double press or hold), the
|
||||||
# state isn't restored on power loss.
|
# state isn't restored on power loss.
|
||||||
# 7. There is an overall brigntness slider/variable. This allows the LEDs (except when
|
# 7. There is an overall brightness slider/variable. This allows the LEDs (except when
|
||||||
# flashing) to have a maximum brightness (eg for night mode)
|
# flashing) to have a maximum brightness (eg for night mode)
|
||||||
#
|
#
|
||||||
# NOTES
|
# NOTES
|
||||||
# 1. To Flash via ESPHome, you likely have to connect to the computer, start the flash
|
# 1. To Flash via ESPHome, you likely have to connect to the computer, start the flash
|
||||||
# then hold down I00 button. I think GPIO12 connection is preventing the flash process.
|
# then hold down I00 button. I think GPIO12 connection is preventing the flash process.
|
||||||
# 2. OTA flash to an Existing Tasmota device is likely a bit hard with and ESP32 as they
|
# 2. OTA flash to an existing Tasmota device is likely a bit hard with and ESP32 as they
|
||||||
# expect a signed Tasmota binary... and partition layout needs to be fixed anyway
|
# expect a signed Tasmota binary... and partition layout needs to be fixed anyway
|
||||||
# 3. ESPHome warns on compiling: "legacy adc driver is deprecated, please migrate to use
|
# 3. ESPHome warns on compiling: "legacy adc driver is deprecated, please migrate to use
|
||||||
# esp_adc/adc_oneshot.h and esp_adc/adc_continuous.h for oneshot mode and continuous mode
|
# esp_adc/adc_oneshot.h and esp_adc/adc_continuous.h for oneshot mode and continuous mode
|
||||||
@@ -105,7 +105,6 @@ substitutions:
|
|||||||
log_level: "INFO" # Define logging level: NONE, ERROR, WARN, INFO, DEBUG (Default), VERBOSE, VERY_VERBOSE
|
log_level: "INFO" # Define logging level: NONE, ERROR, WARN, INFO, DEBUG (Default), VERBOSE, VERY_VERBOSE
|
||||||
update_interval: "60s" # update time for for general sensors etc
|
update_interval: "60s" # update time for for general sensors etc
|
||||||
pwm_freq: "1000Hz" # ESPHome default is 1000Hz, but will go much higher... (not much point for a switch LED)
|
pwm_freq: "1000Hz" # ESPHome default is 1000Hz, but will go much higher... (not much point for a switch LED)
|
||||||
ledc_bits: "12" # ESPHome default resolution is 12 bits
|
|
||||||
|
|
||||||
# Network reconnect every x hours to ensure best access point
|
# Network reconnect every x hours to ensure best access point
|
||||||
# This is my own script. No need to use if only one AP or it is always fixed.
|
# This is my own script. No need to use if only one AP or it is always fixed.
|
||||||
@@ -185,9 +184,9 @@ wifi:
|
|||||||
password: ${fallback_ap_password}
|
password: ${fallback_ap_password}
|
||||||
ap_timeout: 10min # Time until it brings up fallback AP. default is 1min
|
ap_timeout: 10min # Time until it brings up fallback AP. default is 1min
|
||||||
# Allow rapid re-connection to previously connect WiFi SSID, skipping scan of all SSID
|
# Allow rapid re-connection to previously connect WiFi SSID, skipping scan of all SSID
|
||||||
fast_connect: "${wifi_fast_connect}"
|
fast_connect: ${wifi_fast_connect}
|
||||||
# Define dns domain / suffix to add to hostname
|
# Define dns domain / suffix to add to hostname
|
||||||
domain: "${dns_domain}"
|
domain: ${dns_domain}
|
||||||
|
|
||||||
#captive_portal: # extra fallback mechanism for when connecting if the configured WiFi fails
|
#captive_portal: # extra fallback mechanism for when connecting if the configured WiFi fails
|
||||||
|
|
||||||
@@ -225,8 +224,8 @@ mqtt:
|
|||||||
topic_prefix: ${mqtt_topic}/${device_name}
|
topic_prefix: ${mqtt_topic}/${device_name}
|
||||||
username: ${mqtt_username}
|
username: ${mqtt_username}
|
||||||
password: ${mqtt_password}
|
password: ${mqtt_password}
|
||||||
discovery: False # enable entity discovery (true is default)
|
discovery: false # enable entity discovery (true is default)
|
||||||
discover_ip: False # enable device discovery (true is default)
|
discover_ip: false # enable device discovery (true is default)
|
||||||
id: mqtt_client
|
id: mqtt_client
|
||||||
reboot_timeout: 0s # same for MQTT
|
reboot_timeout: 0s # same for MQTT
|
||||||
|
|
||||||
@@ -365,11 +364,11 @@ status_led:
|
|||||||
##########################################################################################
|
##########################################################################################
|
||||||
# SCRIPT COMPONENT
|
# SCRIPT COMPONENT
|
||||||
# https://esphome.io/components/script.html
|
# https://esphome.io/components/script.html
|
||||||
# Scripts can be executednearly anywhere in your device configuration with a single call.
|
# Scripts can be executed nearly anywhere in your device configuration with a single call.
|
||||||
##########################################################################################
|
##########################################################################################
|
||||||
script:
|
script:
|
||||||
# Restart Networking every x hours + rand mins. Starts on reboot and always runs
|
# Restart Networking every x hours + rand mins. Starts on reboot and always runs
|
||||||
# This ensure that the device is connected to the best AP, but no need for it
|
# This ensures that the device is connected to the best AP, but no need for it
|
||||||
# if one AP and it is always reliable.
|
# if one AP and it is always reliable.
|
||||||
- id: random_reconnect
|
- id: random_reconnect
|
||||||
mode: restart
|
mode: restart
|
||||||
@@ -921,9 +920,8 @@ sensor:
|
|||||||
name: "WiFi (%):"
|
name: "WiFi (%):"
|
||||||
filters:
|
filters:
|
||||||
- lambda: return min(max(2 * (x + 100.0), 0.0), 100.0);
|
- lambda: return min(max(2 * (x + 100.0), 0.0), 100.0);
|
||||||
unit_of_measurement: "% Max"
|
unit_of_measurement: "%"
|
||||||
entity_category: "diagnostic"
|
entity_category: "diagnostic"
|
||||||
device_class: ""
|
|
||||||
|
|
||||||
##########################################################################################
|
##########################################################################################
|
||||||
# TEXT SENSOR COMPONENT
|
# TEXT SENSOR COMPONENT
|
||||||
|
Reference in New Issue
Block a user