Skip to content

Commit

Permalink
Included Changes Proposed in PR klatremis#23
Browse files Browse the repository at this point in the history
  • Loading branch information
luckylinux committed Apr 4, 2024
1 parent fd2dab0 commit 4952ace
Show file tree
Hide file tree
Showing 4 changed files with 393 additions and 48 deletions.
7 changes: 7 additions & 0 deletions esphome-config-common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ packages:
ups: !include modules/ups.yaml
out-of-grid: !include modules/out-of-grid.yaml

# Time of Use for Grid-Connected Systems
time-of-use-common: !include modules/time-of-use-common.yaml

# Only Include ONE of these (select OR number)
time-of-use-time-as-select: !include modules/time-of-use-time-as-select.yaml
#time-of-use-time-as-number: !include modules/time-of-use-time-as-number.yaml

#
# Enable for grid-connected systems
#grid: !include modules/grid.yaml
Expand Down
49 changes: 1 addition & 48 deletions modules/time-of-use.yaml → modules/time-of-use-common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,55 +74,8 @@ switch:



number:
- platform: modbus_controller
use_write_multiple: true
modbus_controller_id: ${modbus_controller_id}
id: ${device_type}_Time_of_Use_Time_Point_1
name: "${device_type}-Time of Use - Time Point 1 Start"
address: 148
value_type: U_WORD

- platform: modbus_controller
use_write_multiple: true
modbus_controller_id: ${modbus_controller_id}
id: ${device_type}_Time_of_Use_Time_Point_2
name: "${device_type}-Time of Use - Time Point 2 Start"
address: 149
value_type: U_WORD

- platform: modbus_controller
use_write_multiple: true
modbus_controller_id: ${modbus_controller_id}
id: ${device_type}_Time_of_Use_Time_Point_3
name: "${device_type}-Time of Use - Time Point 3 Start"
address: 150
value_type: U_WORD

- platform: modbus_controller
use_write_multiple: true
modbus_controller_id: ${modbus_controller_id}
id: ${device_type}_Time_of_Use_Time_Point_4
name: "${device_type}-Time of Use - Time Point 4 Start"
address: 151
value_type: U_WORD

- platform: modbus_controller
use_write_multiple: true
modbus_controller_id: ${modbus_controller_id}
id: ${device_type}_Time_of_Use_Time_Point_5
name: "${device_type}-Time of Use - Time Point 5 Start"
address: 152
value_type: U_WORD

- platform: modbus_controller
use_write_multiple: true
modbus_controller_id: ${modbus_controller_id}
id: ${device_type}_Time_of_Use_Time_Point_6
name: "${device_type}-Time of Use - Time Point 6 Start"
address: 153
value_type: U_WORD

number:
- platform: modbus_controller
use_write_multiple: true
modbus_controller_id: ${modbus_controller_id}
Expand Down
48 changes: 48 additions & 0 deletions modules/time-of-use-time-as-number.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
number:
- platform: modbus_controller
use_write_multiple: true
modbus_controller_id: ${modbus_controller_id}
id: ${device_type}_Time_of_Use_Time_Point_1
name: "${device_type}-Time of Use - Time Point 1 Start"
address: 148
value_type: U_WORD

- platform: modbus_controller
use_write_multiple: true
modbus_controller_id: ${modbus_controller_id}
id: ${device_type}_Time_of_Use_Time_Point_2
name: "${device_type}-Time of Use - Time Point 2 Start"
address: 149
value_type: U_WORD

- platform: modbus_controller
use_write_multiple: true
modbus_controller_id: ${modbus_controller_id}
id: ${device_type}_Time_of_Use_Time_Point_3
name: "${device_type}-Time of Use - Time Point 3 Start"
address: 150
value_type: U_WORD

- platform: modbus_controller
use_write_multiple: true
modbus_controller_id: ${modbus_controller_id}
id: ${device_type}_Time_of_Use_Time_Point_4
name: "${device_type}-Time of Use - Time Point 4 Start"
address: 151
value_type: U_WORD

- platform: modbus_controller
use_write_multiple: true
modbus_controller_id: ${modbus_controller_id}
id: ${device_type}_Time_of_Use_Time_Point_5
name: "${device_type}-Time of Use - Time Point 5 Start"
address: 152
value_type: U_WORD

- platform: modbus_controller
use_write_multiple: true
modbus_controller_id: ${modbus_controller_id}
id: ${device_type}_Time_of_Use_Time_Point_6
name: "${device_type}-Time of Use - Time Point 6 Start"
address: 153
value_type: U_WORD
Loading

0 comments on commit 4952ace

Please sign in to comment.