From b65f87fea870ac2fa50cddd70db74cec1b8dd5e4 Mon Sep 17 00:00:00 2001 From: Richard Arends Date: Wed, 16 Oct 2024 17:13:26 +0200 Subject: [PATCH] Remove extra spaces at end of lines --- heatpump.yaml | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/heatpump.yaml b/heatpump.yaml index cc23072..3466c48 100644 --- a/heatpump.yaml +++ b/heatpump.yaml @@ -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 @@ -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" @@ -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" @@ -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" @@ -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" @@ -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" @@ -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" @@ -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" @@ -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" @@ -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" @@ -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" @@ -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" @@ -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" @@ -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 @@ -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 @@ -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; @@ -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; @@ -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