Skip to content

Commit

Permalink
Merge pull request #45 from Mosibi/cleanup_1729091287
Browse files Browse the repository at this point in the history
Remove extra spaces at end of lines
  • Loading branch information
Mosibi authored Oct 16, 2024
2 parents 3f1a11e + b65f87f commit 9d5a29a
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions heatpump.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ sensor:
lambda: |-
// Update the global var unmasked_value_register_0
id(unmasked_value_register_0) = x;
return x;
return x;
# Register: 1 -> Is present in this config as a 'select'
# Register: 2 -> Is present in this config as a 'number'
# Register: 3
Expand Down Expand Up @@ -1088,12 +1088,12 @@ sensor:
return t1s_dhw;
binary_sensor:
# Register: 0 ->Is read as sensor from modbus to be fully switch functioning
# Register: 0 -> Is also read as 'sensor' to read the complete value, used for the templated 'switch'(es)
# Bit: 0 -> Is present in this config as a 'switch'
# Bit: 1 -> Is present in this config as a 'switch'
# Bit: 2 -> Is present in this config as a 'switch'
# Bit: 3 -> Is present in this config as a 'switch'
# Bit: 4
# Bit: 4
- platform: modbus_controller
modbus_controller_id: "${devicename}"
name: "Power Reserved BIT 4"
Expand All @@ -1102,7 +1102,7 @@ binary_sensor:
register_type: holding
address: 0x0
bitmask: 0x10
# Bit: 5
# Bit: 5
- platform: modbus_controller
modbus_controller_id: "${devicename}"
name: "Power Reserved BIT 5"
Expand All @@ -1111,7 +1111,7 @@ binary_sensor:
register_type: holding
address: 0x0
bitmask: 0x20
# Bit: 6
# Bit: 6
- platform: modbus_controller
modbus_controller_id: "${devicename}"
name: "Power Reserved BIT 6"
Expand All @@ -1120,7 +1120,7 @@ binary_sensor:
register_type: holding
address: 0x0
bitmask: 0x40
# Bit: 7
# Bit: 7
- platform: modbus_controller
modbus_controller_id: "${devicename}"
name: "Power Reserved BIT 7"
Expand All @@ -1129,7 +1129,7 @@ binary_sensor:
register_type: holding
address: 0x0
bitmask: 0x80
# Bit: 8
# Bit: 8
- platform: modbus_controller
modbus_controller_id: "${devicename}"
name: "Power Reserved BIT 8"
Expand All @@ -1138,7 +1138,7 @@ binary_sensor:
register_type: holding
address: 0x0
bitmask: 0x100
# Bit: 9
# Bit: 9
- platform: modbus_controller
modbus_controller_id: "${devicename}"
name: "Power Reserved BIT 9"
Expand All @@ -1147,7 +1147,7 @@ binary_sensor:
register_type: holding
address: 0x0
bitmask: 0x200
# Bit: 10
# Bit: 10
- platform: modbus_controller
modbus_controller_id: "${devicename}"
name: "Power Reserved BIT 10"
Expand All @@ -1156,7 +1156,7 @@ binary_sensor:
register_type: holding
address: 0x0
bitmask: 0x400
# Bit: 11
# Bit: 11
- platform: modbus_controller
modbus_controller_id: "${devicename}"
name: "Power Reserved BIT 11"
Expand All @@ -1165,7 +1165,7 @@ binary_sensor:
register_type: holding
address: 0x0
bitmask: 0x800
# Bit: 12
# Bit: 12
- platform: modbus_controller
modbus_controller_id: "${devicename}"
name: "Power Reserved BIT 12"
Expand All @@ -1174,7 +1174,7 @@ binary_sensor:
register_type: holding
address: 0x0
bitmask: 0x1000
# Bit: 13
# Bit: 13
- platform: modbus_controller
modbus_controller_id: "${devicename}"
name: "Power Reserved BIT 13"
Expand All @@ -1183,7 +1183,7 @@ binary_sensor:
register_type: holding
address: 0x0
bitmask: 0x2000
# Bit: 14
# Bit: 14
- platform: modbus_controller
modbus_controller_id: "${devicename}"
name: "Power Reserved BIT 14"
Expand All @@ -1192,7 +1192,7 @@ binary_sensor:
register_type: holding
address: 0x0
bitmask: 0x4000
# Bit: 15
# Bit: 15
- platform: modbus_controller
modbus_controller_id: "${devicename}"
name: "Power Reserved BIT 15"
Expand Down Expand Up @@ -2113,7 +2113,7 @@ switch:
${devicename}->queue_command(set_payload_command);
}
on_turn_off:
# - logger.log: "Switch Turned Off!"
# - logger.log: "Switch Turned Off!"
- lambda: |-
uint16_t checked_bit = 0x1;
uint16_t new_value = id(unmasked_value_register_0); // The original unmasked value
Expand Down Expand Up @@ -2153,7 +2153,7 @@ switch:
${devicename}->queue_command(set_payload_command);
}
on_turn_off:
# - logger.log: "Switch Turned Off!"
# - logger.log: "Switch Turned Off!"
- lambda: |-
uint16_t checked_bit = 0x2;
uint16_t new_value = id(unmasked_value_register_0); // The original unmasked value
Expand Down Expand Up @@ -2188,12 +2188,12 @@ switch:
${devicename}->queue_command(set_payload_command);
}
on_turn_off:
# - logger.log: "Switch Turned Off!"
# - logger.log: "Switch Turned Off!"
- lambda: |-
uint16_t checked_bit = 0x4;
uint16_t new_value = id(unmasked_value_register_0); // The original unmasked value
new_value &= ~checked_bit; // Clear and set
if ((new_value) != id(unmasked_value_register_0)) {
// ESP_LOGD("unmasked_value_register_0", "Set option to off power_dhw_t5s 0x%x -> 0x%x", id(unmasked_value_register_0), new_value);
id(unmasked_value_register_0) = new_value;
Expand Down Expand Up @@ -2228,12 +2228,12 @@ switch:
${devicename}->queue_command(set_payload_command);
}
on_turn_off:
# - logger.log: "Switch Turned Off!"
# - logger.log: "Switch Turned Off!"
- lambda: |-
uint16_t checked_bit = 0x8;
uint16_t new_value = id(unmasked_value_register_0); // The original unmasked value
new_value &= ~checked_bit; // Clear and set
if ((new_value) != id(unmasked_value_register_0)) {
// ESP_LOGD("unmasked_value_register_0", "Set option to off power_air_conditioner_zone_2 0x%x -> 0x%x", id(unmasked_value_register_0), new_value);
id(unmasked_value_register_0) = new_value;
Expand Down Expand Up @@ -3294,7 +3294,7 @@ text_sensor:
return {"Defrosting"};
} else if (id(${devicename}_load_output_sv1).state) {
return {"DHW"};
} else if (id(${devicename}_status_bit_1_heating_mode_set_by_room_thermostat).state
} else if (id(${devicename}_status_bit_1_heating_mode_set_by_room_thermostat).state
|| id(${devicename}_water_flow_temperature_control_zone_1).state) {
return {"Heating"};
} else if (id(${devicename}_status_bit_1_cooling_mode_set_by_room_thermostat).state
Expand Down

0 comments on commit 9d5a29a

Please sign in to comment.