finally got sonoff dual r1 code esphome working as I need

This commit is contained in:
root
2025-06-18 23:12:06 +12:00
parent 4cd88a44a7
commit 23abe209a5
9 changed files with 1039 additions and 325 deletions

View File

@@ -78,16 +78,12 @@ substitutions:
morning_on_default: "450" # Default in minutes from midnight. Default 07:30 => 450
morning_off_default: "450" # Default in minutes from midnight. Default 07:30 => 450 (same as ON as no need for morning schedule)
evening_on_default: "1260" # Default in minutes from midnight. Default 21:00 => 1260
evening_off_default: "1320" # Default in minutes from midnight. Default 22:00 => 1320 => 1440 is midnight
evening_off_default: "1350" # Default in minutes from midnight. Default 22:30 => 1350 => 1440 is midnight
##########################################################################################
# PACKAGES
# https://esphome.io/components/esphome.html
##########################################################################################
##########################################################################################
# Included Common Packages
# https://esphome.io/components/esphome.html
##########################################################################################
packages:
common_wifi: !include
file: common/network_common.yaml
@@ -199,13 +195,13 @@ globals:
- id: evening_on
type: int
restore_value: False
initial_value: "${morning_off_default}"
initial_value: "${evening_on_default}"
# Evening Off time (minutes from midnight),
- id: evening_off
type: int
restore_value: true
initial_value: "${morning_off_default}"
restore_value: False
initial_value: "${evening_off_default}"
# Boost Duration (minutes),
- id: boost_duration