blackscreener

Sprsun Heat Pump esphome logger

Sep 13th, 2023 (edited)
3,975
1
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 251.48 KB | Source Code | 1 0
  1. esphome:
  2.   name: $devicename
  3.   #board_flash_mode: dout
  4.   on_boot:
  5.     - priority: -100.0
  6.       then:
  7.      #- switch.turn_off: switch_1
  8.         if:
  9.           condition:
  10.             binary_sensor.is_on: defrost
  11.           then:
  12.             - globals.set:
  13.                 id: number_compressor_starts
  14.                 value: '0'
  15.  
  16.     - priority: -10
  17.       then:
  18.         if:
  19.           condition:
  20.             lambda: 'return id(fan_pump2_value) > 1;'
  21.           then:
  22.             - fan.turn_on:
  23.                 id: fan_pump2
  24.                 speed: !lambda |-
  25.                     return id(fan_pump2_value) * 100;
  26.           else:
  27.             - fan.turn_off: fan_pump2
  28.  
  29. esp32:
  30.   board: nodemcu-32s
  31.   framework:
  32.     type: esp-idf
  33.    
  34. substitutions:
  35.   devicename: sprsun-logger-v2
  36.   friendly_name: Sprsun
  37.  
  38. wifi:
  39.  #power_save_mode: none
  40.   #fast_connect: yes
  41.   networks:
  42.   - ssid: !secret wifi_ssid
  43.     password: !secret wifi_pass
  44.  
  45.   # Enable fallback hotspot (captive portal) in case wifi connection fails
  46.   ap:
  47.     ssid: "sweet-fallback-${devicename}"
  48.     password: cvbcbcbcvsdsdsdds
  49.  
  50. captive_portal:
  51. logger:
  52.   level: DEBUG
  53.   baud_rate: 0
  54.  
  55. # Enable Home Assistant API
  56. api:
  57.  #password: !secret api-password
  58.  
  59. ota:
  60.   - platform: esphome
  61.   #password: !secret ota-password
  62.  
  63. # Enable Web server
  64. #web_server:
  65.  # port: 80
  66.  
  67. uart:
  68.   - id: mod_bus #sprsun
  69.     tx_pin: 17
  70.     rx_pin: 16
  71.     baud_rate: 19200
  72.     stop_bits: 2
  73.  
  74.   - id: mod_bus2 #pzem
  75.     tx_pin: 1
  76.     rx_pin: 3
  77.     baud_rate: 9600
  78.     stop_bits: 2  #1 dla esp8266
  79.  
  80. #bluetooth_proxy:
  81. #esp32_ble_tracker:
  82.  
  83.  
  84. one_wire:
  85.   - platform: gpio
  86.     pin: 18
  87.  
  88. modbus:
  89.   - id: mod_bus_sprsun
  90.     uart_id: mod_bus
  91.     send_wait_time: 200ms
  92.     flow_control_pin: GPIO4
  93. #   - id: mod_bus_tec
  94. #     uart_id: mod_bus
  95. #     send_wait_time: 200ms
  96. #     flow_control_pin: GPIO4
  97.   - id: mod_bus_pzem
  98.     #send_wait_time: 200ms
  99.     uart_id: mod_bus2
  100.     setup_priority: -10
  101.  
  102.  
  103. button:
  104.   - platform: restart
  105.     name: "Sprsun Logger restart"
  106.  
  107. output:
  108. # Pompa 2
  109.   - platform: ledc
  110.     pin: 26
  111.     frequency: 1000Hz
  112.     id: ledc_pump2
  113.  
  114.   - platform: template
  115.     id: custom_fan_pump2
  116.     type: float #0.42
  117.     write_action:
  118.       - lambda: |-
  119.           if (id(on_boot_pump2)) {
  120.             id(on_boot_pump2) = false;
  121.             return;
  122.           }
  123.           float in_min = 0.01;
  124.           float in_max = 1.0;
  125.           float out_min = 0.84;
  126.           float out_max = 0.10;
  127.           id(fan_pump2_state) = state > 0;
  128.           float value = state == 0 ? 0.96 : (state - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;
  129.           id(ledc_pump2).set_level(value);
  130.          
  131. fan:
  132. # Pompa 2
  133.   - platform: speed
  134.     id: fan_pump2
  135.     output: custom_fan_pump2
  136.     name: "Pompa 2 PWM"
  137.  
  138. modbus_controller:
  139.   - id: sprsun_pc
  140.     address: 0x01
  141.     modbus_id: mod_bus_sprsun
  142.     update_interval: 5s
  143.     setup_priority: -10
  144.  
  145.   - id: tec
  146.     address: 0x02
  147.     modbus_id: mod_bus_sprsun
  148.     update_interval: 5s
  149.     setup_priority: -10
  150.  
  151.   - id: pzem1
  152.     modbus_id: mod_bus_pzem
  153.     command_throttle: 0ms
  154.     setup_priority: -10
  155.     update_interval: 5s
  156.  
  157.  
  158. globals:
  159.   - id: number_compressor_starts
  160.     type: int
  161.     restore_value: no
  162.     initial_value: '0'
  163.  
  164.   - id: unmasked_value_timeband1
  165.     type: uint16_t
  166.     restore_value: no
  167.     initial_value: '0'
  168.  
  169.   - id: number_defrost
  170.     type: int
  171.     restore_value: no
  172.     initial_value: '0'
  173.  
  174. # Pompa 2
  175.   - id: on_boot_pump2
  176.     type: bool
  177.     initial_value: "true"
  178.   - id: fan_pump2_state
  179.     type: bool
  180.   - id: pump2_stop_pwm
  181.     type: int
  182.     restore_value: no
  183.     initial_value: '0'
  184.  
  185.   - id: fan_pump2_value
  186.     type: float
  187.     restore_value: yes
  188.     initial_value: "0.3"
  189.  
  190.  
  191. binary_sensor:
  192. - platform: modbus_controller
  193.   modbus_controller_id: sprsun_pc
  194.   name: Grzałka CO
  195.   id: grzalka_co
  196.   #entity_category: diagnostic
  197.   #device_class: heat
  198.   register_type: holding
  199.   address: 0x0005
  200.   bitmask: 0x20
  201.   on_press:
  202.     if:
  203.       condition:
  204.         switch.is_on: blokada_grzalka_co
  205.       then:
  206.         - switch.turn_on: relay_grzalka_co
  207.   on_release:
  208.     if:
  209.       condition:
  210.         switch.is_on: blokada_grzalka_co
  211.       then:
  212.         - switch.turn_off: relay_grzalka_co
  213.  
  214. - platform: modbus_controller
  215.   modbus_controller_id: sprsun_pc
  216.   name: Grzałka CWU
  217.   id: grzalka_cwu
  218.   #entity_category: diagnostic
  219.   #device_class: heat
  220.   register_type: holding
  221.   address: 0x0005
  222.   bitmask: 0x80
  223.   on_press:
  224.     if:
  225.       condition:
  226.         switch.is_on: blokada_grzalka_cwu
  227.       then:
  228.         - switch.turn_on: relay_grzalka_cwu
  229.   on_release:
  230.     if:
  231.       condition:
  232.         switch.is_on: blokada_grzalka_cwu
  233.       then:
  234.         - switch.turn_off: relay_grzalka_cwu
  235.  
  236. - platform: modbus_controller
  237.   modbus_controller_id: sprsun_pc
  238.   name: Grzanie CWU
  239.   id: hotwater_demand
  240.   #entity_category: diagnostic
  241.   #device_class: heat
  242.   register_type: holding
  243.   address: 0x0003
  244.   bitmask: 0x01
  245.  
  246. - platform: modbus_controller
  247.   modbus_controller_id: sprsun_pc
  248.   name: Grzanie CO
  249.   id: heating_demand
  250.   #entity_category: diagnostic
  251.   #device_class: heat
  252.   register_type: holding
  253.   address: 0x0003
  254.   bitmask: 0x02
  255.  
  256. - platform: modbus_controller
  257.   modbus_controller_id: sprsun_pc
  258.   name: Defrost
  259.   id: defrost
  260.   #entity_category: diagnostic
  261.   #device_class: heat
  262.   register_type: holding
  263.   address: 0x0003
  264.   bitmask: 0x80
  265.   on_press:
  266.     - globals.set:
  267.         id: number_defrost
  268.         value: '1'
  269.   on_release:
  270.     - delay: 7s
  271.     - globals.set:
  272.         id: number_defrost
  273.         value: '0'
  274.  
  275.  
  276. - platform: modbus_controller
  277.   modbus_controller_id: sprsun_pc
  278.   name: Praca sprężarki
  279.   id: compressor_demand
  280.   #entity_category: diagnostic
  281.   #device_class: heat
  282.   register_type: holding
  283.   address: 0x0004
  284.   bitmask: 0x01
  285.   on_press:
  286.     then:
  287.       - lambda: 'id(number_compressor_starts)++;'
  288.  
  289. text_sensor:
  290.   - platform: template
  291.     id: pump1_status
  292.     name: "Pompa CO status"
  293.     icon: mdi:thermostat
  294.  
  295.   - platform: template
  296.     id: pump2_status
  297.     name: "Pompa CO 2 status"
  298.     icon: mdi:thermostat
  299.  
  300.   - platform: template
  301.     name: ${friendly_name} Uptime
  302.     id: uptime_human
  303.     icon: mdi:clock-start
  304.    
  305.   - platform: modbus_controller
  306.     modbus_controller_id: sprsun_pc
  307.     name: ${friendly_name} Switching input symbol
  308.     id: switching_input_symbol
  309.     register_type: holding
  310.     address: 0x0002
  311.     response_size: 2
  312.     raw_encode: HEXBYTES
  313.     #bitmask: 0
  314.     lambda: |-
  315.        std::string z = "";
  316.        int idx = item->offset+1;
  317.        if ((data[idx] & 0x0001) != 0) z += "A/C Linkage switch, ";
  318.        if ((data[idx] & 0x0002) != 0) z += "Linkage switch, ";
  319.        if ((data[idx] & 0x0004) != 0) z += "Heating linkage, ";
  320.        if ((data[idx] & 0x0008) != 0) z += "Cooling linkage, ";
  321.        if ((data[idx] & 0x0010) != 0) z += "Flow Switch, ";
  322.        if ((data[idx] & 0x0020) != 0) z += "High pessure switch, ";
  323.        if ((data[idx] & 0x0040) != 0) z += "Phase sequence detection, ";
  324.        if ((data[idx] & 0x0080) != 0) z += "Invalid, ";
  325.    
  326.        if(z.length() > 0){
  327.          z.pop_back();
  328.        }
  329.        return {z};
  330.  
  331.   - platform: modbus_controller
  332.     modbus_controller_id: sprsun_pc
  333.     name: ${friendly_name} Working status mark
  334.     id: working_status_mark
  335.     register_type: holding
  336.     address: 0x0003
  337.     response_size: 2
  338.     raw_encode: HEXBYTES
  339.     #bitmask: 0
  340.     lambda: |-
  341.        std::string z = "";
  342.        int idx = item->offset+1;
  343.        if ((data[idx] & 0x0001) != 0) z += "Hot water demand, ";
  344.        if ((data[idx] & 0x0002) != 0) z += "Heating demand, ";
  345.        if ((data[idx] & 0x0004) != 0) z += "With or without heating, ";
  346.        if ((data[idx] & 0x0008) != 0) z += "With or without cooling, ";
  347.        if ((data[idx] & 0x0010) != 0) z += "Antilegionella on, ";
  348.        if ((data[idx] & 0x0020) != 0) z += "Cooling demand, ";
  349.        if ((data[idx] & 0x0040) != 0) z += "Alarm downtime, ";
  350.        if ((data[idx] & 0x0080) != 0) z += "Defrost, ";
  351.    
  352.        if(z.length() > 0){
  353.          z.pop_back();
  354.        }
  355.        return {z};
  356.  
  357.   - platform: modbus_controller
  358.     modbus_controller_id: sprsun_pc
  359.     name: ${friendly_name} Output symbol 1
  360.     id: output_symbol_1
  361.     register_type: holding
  362.     address: 0x0004
  363.     response_size: 2
  364.     raw_encode: HEXBYTES
  365.     #bitmask: 0
  366.     lambda: |-
  367.        std::string z = "";
  368.        int idx = item->offset+1;
  369.        if ((data[idx] & 0x0001) != 0) z += "Compressor, ";
  370.        if ((data[idx] & 0x0002) != 0) z += "Invalid, ";
  371.        if ((data[idx] & 0x0004) != 0) z += "Invalid, ";
  372.        if ((data[idx] & 0x0008) != 0) z += "Invalid, ";
  373.        if ((data[idx] & 0x0010) != 0) z += "Invalid, ";
  374.        if ((data[idx] & 0x0020) != 0) z += "Fan, ";
  375.        if ((data[idx] & 0x0040) != 0) z += "4-way valve, ";
  376.        if ((data[idx] & 0x0080) == 0) z += "Low fan speed, ";
  377.        if ((data[idx] & 0x0080) == 128) z += "High fan speed, ";
  378.    
  379.        if(z.length() > 0){
  380.          z.pop_back();
  381.        }
  382.        return {z};
  383.  
  384.  
  385.        
  386.   - platform: modbus_controller
  387.     modbus_controller_id: sprsun_pc
  388.     name: ${friendly_name} Output symbol 2
  389.     id: output_symbol_2
  390.     register_type: holding
  391.     address: 0x0005
  392.     response_size: 2
  393.     raw_encode: HEXBYTES
  394.     #bitmask: 0
  395.     lambda: |-
  396.        std::string z = "";
  397.        int idx = item->offset+1;
  398.        if ((data[idx] & 0x0001) != 0) z += "Chasis heater, ";
  399.        if ((data[idx] & 0x0002) != 0) z += "Invalid, ";
  400.        if ((data[idx] & 0x0004) != 0) z += "Invalid, ";
  401.        if ((data[idx] & 0x0008) != 0) z += "Invalid, ";
  402.        if ((data[idx] & 0x0010) != 0) z += "Invalid, ";
  403.        if ((data[idx] & 0x0020) != 0) z += "Heating heater, ";
  404.        if ((data[idx] & 0x0040) != 0) z += "Three-way valve, ";
  405.        if ((data[idx] & 0x0080) != 0) z += "Hotwater heater, ";
  406.    
  407.        if(z.length() > 0){
  408.          z.pop_back();
  409.        }
  410.        return {z};
  411.  
  412.   - platform: modbus_controller
  413.     modbus_controller_id: sprsun_pc
  414.     name: ${friendly_name} Output symbol 3
  415.     id: output_symbol_3
  416.     register_type: holding
  417.     address: 0x0006
  418.     response_size: 2
  419.     raw_encode: HEXBYTES
  420.     #bitmask: 0
  421.     lambda: |-
  422.        std::string z = "";
  423.        int idx = item->offset+1;
  424.        if ((data[idx] & 0x0001) != 0) z += "A/C PUMP, ";
  425.        if ((data[idx] & 0x0002) != 0) z += "Crank heater, ";
  426.        if ((data[idx] & 0x0004) != 0) z += "Invalid, ";
  427.        if ((data[idx] & 0x0008) != 0) z += "Invalid, ";
  428.        if ((data[idx] & 0x0010) != 0) z += "Invalid, ";
  429.        if ((data[idx] & 0x0020) != 0) z += "Assistant solenoid valve, ";
  430.        if ((data[idx] & 0x0040) != 0) z += "Pump, ";
  431.        if ((data[idx] & 0x0080) != 0) z += "Invalid, ";
  432.    
  433.        if(z.length() > 0){
  434.          z.pop_back();
  435.        }
  436.        return {z};
  437.        
  438.   - platform: modbus_controller
  439.     modbus_controller_id: sprsun_pc
  440.     name: ${friendly_name} Failure symbol 1
  441.     id: failure_symbol_1
  442.     register_type: holding
  443.     address: 0x0007
  444.     response_size: 2
  445.     raw_encode: HEXBYTES
  446.     #bitmask: 0
  447.     lambda: |-
  448.        std::string z = "";
  449.        int idx = item->offset+1;
  450.        if ((data[idx] & 0x0001) != 0) z += "Hotwater temp, ";
  451.        if ((data[idx] & 0x0002) != 0) z += "Ambi temp, ";
  452.        if ((data[idx] & 0x0004) != 0) z += "Coil temp, ";
  453.        if ((data[idx] & 0x0008) != 0) z += "Invalid, ";
  454.        if ((data[idx] & 0x0010) != 0) z += "Outlet temp, ";
  455.        if ((data[idx] & 0x0020) != 0) z += "High pressure sensor failure, ";
  456.        if ((data[idx] & 0x0040) != 0) z += "Invalid, ";
  457.        if ((data[idx] & 0x0080) != 0) z += "Phase sequence, ";
  458.    
  459.        if(z.length() > 0){
  460.          z.pop_back();
  461.        }
  462.        return {z};
  463.  
  464.   - platform: modbus_controller
  465.     modbus_controller_id: sprsun_pc
  466.     name: ${friendly_name} Failure symbol 2
  467.     id: failure_symbol_2
  468.     register_type: holding
  469.     address: 0x0008
  470.     response_size: 2
  471.     raw_encode: HEXBYTES
  472.     #bitmask: 0
  473.     lambda: |-
  474.        std::string z = "";
  475.        int idx = item->offset+1;
  476.        if ((data[idx] & 0x0001) != 0) z += "Water flow failure, ";
  477.        if ((data[idx] & 0x0002) != 0) z += "Invalid, ";
  478.        if ((data[idx] & 0x0004) != 0) z += "High protection of heating water outlet, ";
  479.        if ((data[idx] & 0x0008) != 0) z += "Invalid, ";
  480.        if ((data[idx] & 0x0010) != 0) z += "Invalid, ";
  481.        if ((data[idx] & 0x0020) != 0) z += "Invalid, ";
  482.        if ((data[idx] & 0x0040) != 0) z += "Invalid, ";
  483.        if ((data[idx] & 0x0080) != 0) z += "Invalid, ";
  484.    
  485.        if(z.length() > 0){
  486.          z.pop_back();
  487.        }
  488.        return {z};
  489.  
  490.   - platform: modbus_controller
  491.     modbus_controller_id: sprsun_pc
  492.     name: ${friendly_name} Failure symbol 3
  493.     id: failure_symbol_3
  494.     register_type: holding
  495.     address: 0x0009
  496.     response_size: 2
  497.     raw_encode: HEXBYTES
  498.     #bitmask: 0
  499.     lambda: |-
  500.        std::string z = "";
  501.        int idx = item->offset+1;
  502.        if ((data[idx] & 0x0001) != 0) z += "Invalid, ";
  503.        if ((data[idx] & 0x0002) != 0) z += "Invalid, ";
  504.        if ((data[idx] & 0x0004) != 0) z += "Invalid, ";
  505.        if ((data[idx] & 0x0008) != 0) z += "Invalid, ";
  506.        if ((data[idx] & 0x0010) != 0) z += "Invalid, ";
  507.        if ((data[idx] & 0x0020) != 0) z += "Invalid, ";
  508.        if ((data[idx] & 0x0040) != 0) z += "Outlet gas temp failure, ";
  509.        if ((data[idx] & 0x0080) != 0) z += "Invalid, ";
  510.    
  511.        if(z.length() > 0){
  512.          z.pop_back();
  513.        }
  514.        return {z};
  515.        
  516.   - platform: modbus_controller
  517.     modbus_controller_id: sprsun_pc
  518.     name: ${friendly_name} Failure symbol 4
  519.     id: failure_symbol_4
  520.     register_type: holding
  521.     address: 0x000A
  522.     response_size: 2
  523.     raw_encode: HEXBYTES
  524.     #bitmask: 0
  525.     lambda: |-
  526.        std::string z = "";
  527.        int idx = item->offset+1;
  528.        if ((data[idx] & 0x0001) != 0) z += "Water inlet temp failure, ";
  529.        if ((data[idx] & 0x0002) != 0) z += "Exhaust temperature is too high, ";
  530.        if ((data[idx] & 0x0004) != 0) z += "Invalid, ";
  531.        if ((data[idx] & 0x0008) != 0) z += "Invalid, ";
  532.        if ((data[idx] & 0x0010) != 0) z += "Invalid, ";
  533.        if ((data[idx] & 0x0020) != 0) z += "Low protection of cooling water outlet, ";
  534.        if ((data[idx] & 0x0040) != 0) z += "Inlet gas temp failure, ";
  535.        if ((data[idx] & 0x0080) != 0) z += "Invalid, ";
  536.    
  537.        if(z.length() > 0){
  538.          z.pop_back();
  539.        }
  540.        return {z};
  541.        
  542.   - platform: modbus_controller
  543.     modbus_controller_id: sprsun_pc
  544.     name: ${friendly_name} Failure symbol 5
  545.     id: failure_symbol_5
  546.     register_type: holding
  547.     address: 0x000B
  548.     response_size: 2
  549.     raw_encode: HEXBYTES
  550.     #bitmask: 0
  551.     lambda: |-
  552.        std::string z = "";
  553.        int idx = item->offset+1;
  554.        if ((data[idx] & 0x0001) != 0) z += "Low pressure protection, ";
  555.        if ((data[idx] & 0x0002) != 0) z += "High pressure protection, ";
  556.        if ((data[idx] & 0x0004) != 0) z += "Coil temperature is too high, ";
  557.        if ((data[idx] & 0x0008) != 0) z += "Invalid, ";
  558.        if ((data[idx] & 0x0010) != 0) z += "Invalid, ";
  559.        if ((data[idx] & 0x0020) != 0) z += "Invalid, ";
  560.        if ((data[idx] & 0x0040) != 0) z += "High pressure sensor failure, ";
  561.        if ((data[idx] & 0x0080) != 0) z += "Low pressure sensor failure, ";
  562.    
  563.        if(z.length() > 0){
  564.          z.pop_back();
  565.        }
  566.        return {z};
  567.  
  568.  
  569.   - platform: modbus_controller
  570.     modbus_controller_id: sprsun_pc
  571.     name: ${friendly_name} Failure symbol 6
  572.     id: failure_symbol_6
  573.     register_type: holding
  574.     address: 0x000C
  575.     response_size: 2
  576.     raw_encode: HEXBYTES
  577.     #bitmask: 0
  578.     lambda: |-
  579.        std::string z = "";
  580.        int idx = item->offset+1;
  581.        if ((data[idx] & 0x0001) != 0) z += "Invalid, ";
  582.        if ((data[idx] & 0x0002) != 0) z += "Invalid, ";
  583.        if ((data[idx] & 0x0004) != 0) z += "Invalid, ";
  584.        if ((data[idx] & 0x0008) != 0) z += "Invalid, ";
  585.        if ((data[idx] & 0x0010) != 0) z += "Sec antifreeze, ";
  586.        if ((data[idx] & 0x0020) != 0) z += "One antifreeze, ";
  587.        if ((data[idx] & 0x0040) != 0) z += "Invalid, ";
  588.        if ((data[idx] & 0x0080) != 0) z += "Invalid, ";
  589.    
  590.        if(z.length() > 0){
  591.          z.pop_back();
  592.        }
  593.        return {z};
  594.  
  595.   - platform: modbus_controller
  596.     modbus_controller_id: sprsun_pc
  597.     name: ${friendly_name} Failure symbol 7
  598.     id: failure_symbol_7
  599.     register_type: holding
  600.     address: 0x000D
  601.     response_size: 2
  602.     raw_encode: HEXBYTES
  603.     #bitmask: 0
  604.     lambda: |-
  605.        std::string z = "";
  606.        int idx = item->offset+1;
  607.        if ((data[idx] & 0x0001) != 0) z += "Invalid, ";
  608.        if ((data[idx] & 0x0002) != 0) z += "Ambient temperature is too low, ";
  609.        if ((data[idx] & 0x0004) != 0) z += "Invalid, ";
  610.        if ((data[idx] & 0x0008) != 0) z += "Invalid, ";
  611.        if ((data[idx] & 0x0010) != 0) z += "Frequency conversion module is faulty ";
  612.        if ((data[idx] & 0x0020) != 0) z += "2# DC fan failure, ";
  613.        if ((data[idx] & 0x0040) != 0) z += "1# DC fan failure, ";
  614.        if ((data[idx] & 0x0080) != 0) z += "Invalid, ";
  615.    
  616.        if(z.length() > 0){
  617.          z.pop_back();
  618.        }
  619.        return {z};
  620.  
  621.  
  622. climate:
  623.   - platform: bang_bang
  624.     name: "Termostat CO"
  625.     id: termostat_co
  626.     sensor: temp_co_dallas
  627.     default_target_temperature_low: 20 °C
  628.     default_target_temperature_high: 40 °C
  629.     visual:
  630.       min_temperature: 10
  631.       max_temperature: 55
  632.       temperature_step: 1.0
  633.     heat_action:
  634.       - switch.turn_on: relay_grzalka_co
  635.     idle_action:
  636.       - switch.turn_off: relay_grzalka_co
  637.  
  638.   - platform: bang_bang
  639.     name: "Termostat CWU"
  640.     id: termostat_cwu
  641.     sensor: temp_cwu_dallas
  642.     default_target_temperature_low: 35 °C
  643.     default_target_temperature_high: 55 °C
  644.     visual:
  645.       min_temperature: 10
  646.       max_temperature: 80
  647.       temperature_step: 1.0
  648.     heat_action:
  649.       - switch.turn_on: relay_grzalka_cwu
  650.     idle_action:
  651.       - switch.turn_off: relay_grzalka_cwu
  652.  
  653. time:
  654.   - platform: sntp
  655.     id: my_time
  656. ############################################################
  657. sensor:
  658.   - platform: integration
  659.     name: "Produkcja Ciepła Energia"
  660.     unit_of_measurement: "kWh"
  661.     # Poprawnie wcięte opcje
  662.     sensor: moc_cieplna
  663.     time_unit: h
  664.     accuracy_decimals: 3
  665.     icon: mdi:counter
  666.     device_class: energy
  667.     state_class: total_increasing  # Dodaj tę linię!
  668.     restore: true
  669.     # Konwersja jednostek - 1W * 1h = 1Wh. Aby otrzymać kWh, dzielimy przez 1000
  670.     filters:
  671.       - multiply: 0.001
  672.  
  673.   # Sensor dla produkcji ciepła na CO
  674.   - platform: integration
  675.     name: "Produkcja Ciepła Energia CO"
  676.     unit_of_measurement: "kWh"
  677.     # Poprawnie wcięte opcje
  678.     sensor: moc_cieplna_co
  679.     time_unit: h
  680.     accuracy_decimals: 3
  681.     icon: mdi:counter
  682.     device_class: energy
  683.     state_class: total_increasing  # Dodaj tę linię!
  684.     restore: false
  685.     # Konwersja jednostek - 1W * 1h = 1Wh. Aby otrzymać kWh, dzielimy przez 1000
  686.     filters:
  687.       - multiply: 0.001
  688.  
  689.   - platform: integration
  690.     name: "Produkcja Ciepła Energia CWU"
  691.     unit_of_measurement: "kWh"
  692.     # Poprawnie wcięte opcje
  693.     sensor: moc_cieplna_cwu
  694.     time_unit: h
  695.     accuracy_decimals: 3
  696.     icon: mdi:counter
  697.     device_class: energy
  698.     state_class: total_increasing  # Dodaj tę linię!
  699.     restore: false
  700.     # Konwersja jednostek - 1W * 1h = 1Wh. Aby otrzymać kWh, dzielimy przez 1000
  701.     filters:
  702.       - multiply: 0.001
  703.  
  704.   - platform: internal_temperature
  705.     name: "Internal Temperature"
  706.  
  707.   - name: "Liczba włączeń sprężarki" # From global variable To HA
  708.     id: number_of_compressor_starts
  709.     platform: template
  710.     #unit_of_measurement: "litres"
  711.     accuracy_decimals: 0
  712.     lambda: 'return id(number_compressor_starts);'
  713.     update_interval: 60s
  714.     state_class: measurement
  715.  
  716.  
  717.  
  718. ############################################
  719.   - platform: modbus_controller
  720.     modbus_controller_id: sprsun_pc
  721.     id: parameter_marker_definition_raw
  722.     register_type: holding
  723.     address: 0x0032
  724.     value_type: U_WORD
  725.  
  726.   - platform: modbus_controller
  727.     modbus_controller_id: sprsun_pc
  728.     id: control_mark_1_raw
  729.     register_type: holding
  730.     address: 0x0033
  731.     value_type: U_WORD
  732.  
  733.   - platform: modbus_controller
  734.     modbus_controller_id: sprsun_pc
  735.     id: control_mark_2_raw
  736.     register_type: holding
  737.     address: 0x0034
  738.     value_type: U_WORD
  739.  
  740.   - platform: modbus_controller
  741.     modbus_controller_id: sprsun_pc
  742.     id: timeband_raw
  743.     register_type: holding
  744.     address: 0x0035
  745.     value_type: U_WORD
  746.  
  747.   - platform: modbus_controller
  748.     modbus_controller_id: sprsun_pc
  749.     id: week_set_of_timeband_1_raw
  750.     register_type: holding
  751.     address: 0x01AD
  752.     value_type: U_WORD
  753.     lambda: |-
  754.       // Update the global var unmasked_value_timeband1
  755.       id(unmasked_value_timeband1) = x;
  756.       return x;
  757.  
  758.   - platform: modbus_controller
  759.     modbus_controller_id: sprsun_pc
  760.     id: week_set_of_timeband_2_raw
  761.     register_type: holding
  762.     address: 0x01AE
  763.     value_type: U_WORD
  764.  
  765.   - platform: modbus_controller
  766.     modbus_controller_id: sprsun_pc
  767.     id: week_set_of_timeband_3_raw
  768.     register_type: holding
  769.     address: 0x01AF
  770.     value_type: U_WORD
  771.  
  772. #########################################################################
  773. ###########  Status pompy obiegowej przed buforem
  774.   - platform: duty_cycle
  775.     pin:
  776.       number: 33
  777.       mode: INPUT_PULLUP
  778.     id: pump1_power_internal
  779.     internal: true
  780.     name: Pompa obiegowa CO pobór internal
  781.     update_interval: 5s
  782.     accuracy_decimals: 0
  783.     device_class: "power"
  784.     unit_of_measurement: 'W'
  785.     on_value:
  786.       - lambda: |-
  787.           ESP_LOGD("pompa_co", "state=%f", id(pump1_power_internal).state);
  788.           if (id(pump1_power_internal).state == 0) {
  789.             id(pump1_status).publish_state("Wyłączona");
  790.           }
  791.           else if (id(pump1_power_internal).state > 74 && id(pump1_power_internal).state < 76) {
  792.             id(pump1_status).publish_state("Ostrzeżenie");
  793.           }
  794.           else if (id(pump1_power_internal).state > 84 && id(pump1_power_internal).state < 86) {
  795.             id(pump1_status).publish_state("Zatrzymanie alarmowe, awaria elektryczna");
  796.           }
  797.           else if (id(pump1_power_internal).state > 89 && id(pump1_power_internal).state < 91) {
  798.             id(pump1_status).publish_state("Zatrzymanie alarmowe, blokada");
  799.           }
  800.           else if (id(pump1_power_internal).state > 94 && id(pump1_power_internal).state < 96) {
  801.             id(pump1_status).publish_state("Tryb gotowości przez sygnał PWM (STOP)");
  802.           }
  803.           else if (id(pump1_power_internal).state >= 100) {
  804.             id(pump1_status).publish_state("Wyłączona");
  805.           }
  806.           else if (id(dc_pump_speed).state < 100 && id(dc_pump_speed).state >= 1) {
  807.             id(pump1_status).publish_state("Tryb PWM");      
  808.           }
  809.           else {
  810.             id(pump1_status).publish_state("Tryb ręczny");
  811.           }
  812.  
  813.  
  814.   - platform: copy
  815.     id: pump1_power
  816.     source_id: pump1_power_internal
  817.     name: Pompa obiegowa CO pobór
  818.     accuracy_decimals: 0
  819.     device_class: "power"
  820.     unit_of_measurement: 'W'
  821.     filters:
  822.       - lambda: |-
  823.           return x > 70.0 ? 0.0 : x;
  824.  
  825. #########################################################################
  826. ###########  Status pompy obiegowej za buforem
  827.   - platform: duty_cycle
  828.     pin:
  829.       number: 23
  830.       mode: INPUT_PULLUP
  831.     id: pump2_power_internal
  832.     name: Pompa obiegowa CO 2 pobór internal
  833.     internal: true
  834.     update_interval: 5s
  835.     accuracy_decimals: 0
  836.     device_class: "power"
  837.     unit_of_measurement: 'W'      
  838.     on_value:
  839.       - lambda: |-
  840.           ESP_LOGD("pompa_co2", "state=%f", id(pump2_power_internal).state);
  841.           if (id(pump2_power_internal).state == 0 && id(pump2_stop_pwm) == 0) {
  842.             id(pump2_status).publish_state("Wyłączona");
  843.           }
  844.           else if (id(pump2_power_internal).state > 74 && id(pump2_power_internal).state < 76) {
  845.             id(pump2_status).publish_state("Ostrzeżenie");
  846.           }
  847.           else if (id(pump2_power_internal).state > 84 && id(pump2_power_internal).state < 86) {
  848.             id(pump2_status).publish_state("Zatrzymanie alarmowe, awaria elektryczna");
  849.           }
  850.           else if (id(pump2_power_internal).state > 89 && id(pump2_power_internal).state < 91) {
  851.             id(pump2_status).publish_state("Zatrzymanie alarmowe, blokada");
  852.           }
  853.           else if (id(pump2_power_internal).state >= 94 && id(pump2_power_internal).state < 96) {
  854.             id(pump2_status).publish_state("Tryb gotowości przez sygnał PWM (STOP)");
  855.             id(pump2_stop_pwm) = 1;
  856.           }
  857.           else if (id(pump2_power_internal).state >= 100) {
  858.             id(pump2_status).publish_state("Wyłączona");
  859.             id(pump2_stop_pwm) = 0;
  860.           }
  861.           else {
  862.             if (id(fan_pump2_state)) {
  863.               id(pump2_status).publish_state("Tryb PWM");
  864.               id(pump2_stop_pwm) = 0;
  865.           }
  866.             else if (id(pump2_stop_pwm) == 0)
  867.             { id(pump2_status).publish_state("Tryb ręczny"); }
  868.           }
  869.  
  870.  
  871.   - platform: copy
  872.     id: pump2_power
  873.     source_id: pump2_power_internal
  874.     name: Pompa obiegowa CO 2 pobór
  875.     accuracy_decimals: 0
  876.     device_class: "power"
  877.     unit_of_measurement: 'W'
  878.     filters:
  879.       - lambda: |-
  880.           return x > 70.0 ? 0.0 : x;
  881.  
  882. ##########################################################################
  883.  
  884.  
  885. ##########################################################################
  886.   - platform: duty_time
  887.     name: "Czas pracy grzanie CO"
  888.     id: work_time_heating
  889.     #sensor: heating_demand
  890.     # ... EOR 'lambda'
  891.     lambda: "return id(compressor_demand).state && id(heating_demand).state;"
  892.     # Restore (optional, default: False)
  893.     restore: false
  894.     last_time:
  895.       name: Last time grzanie CO
  896.  
  897.  
  898.   - platform: duty_time
  899.     name: "Czas pracy grzanie CWU"
  900.     id: work_time_hot_water
  901.     #sensor: hotwater_demand
  902.     # ... EOR 'lambda'
  903.     lambda: "return id(compressor_demand).state && id(hotwater_demand).state;"
  904.     # Restore (optional, default: False)
  905.     restore: false
  906.     last_time:
  907.       name: Last time grzanie CWU
  908.  
  909.   - platform: duty_time
  910.     name: "Czas pracy sprężarki"
  911.     id: work_time
  912.     sensor: compressor_demand
  913.     # ... EOR 'lambda'
  914.     #lambda: "return id(my_climate).mode != CLIMATE_MODE_OFF;"
  915.     # Restore (optional, default: False)
  916.     restore: false
  917.     last_time:
  918.       name: Last time grzanie
  919.  
  920.  
  921. ############   PZEM-004T V3 Pompa
  922. #   - platform: pzemac
  923. #     modbus_id: mod_bus_pzem
  924. #     address: 1
  925. #     current:
  926. #       name: "PC prąd"
  927. #       accuracy_decimals: 2
  928. #       id: pc_prad
  929. #     voltage:
  930. #       name: "PC napięcie"
  931. #       unit_of_measurement: V
  932. #       accuracy_decimals: 2
  933. #       id: pc_napiecie
  934. #     energy:
  935. #       name: "PC zużycie energii"
  936. #       filters:
  937. #         # Wh to kWh is 0.001
  938. #         - multiply: 0.001
  939. #       unit_of_measurement: kWh
  940. #       accuracy_decimals: 3
  941. #       id: pc_energia
  942. #     power:
  943. #       name: "PC moc"
  944. #       unit_of_measurement: W
  945. #       accuracy_decimals: 2
  946. #       id: pc_moc
  947. #     frequency:
  948. #       name: "PC częstotliwość"
  949. #       unit_of_measurement: Hz
  950. #       accuracy_decimals: 2
  951. #     power_factor:
  952. #       name: "PC współczynnik mocy"
  953. #       accuracy_decimals: 2
  954. #       id: pc_power_factor
  955. #     update_interval: 5s
  956.  
  957. #   - platform: total_daily_energy
  958. #     name: "PC dzienne zużycie energii"
  959. #     power_id: pc_moc
  960. #     unit_of_measurement: "kWh"
  961. #     accuracy_decimals: 3
  962. #     id: pc_daily_kwh
  963. #     icon: mdi:counter
  964. #     device_class: energy
  965. #     filters:
  966. #       # Multiplication factor from W to kW is 0.001
  967. #       - multiply: 0.001
  968.  
  969. ############ Licznik TEC 1100 Pompa
  970.   - platform: modbus_controller
  971.     modbus_controller_id: tec
  972.     name: "PC moc"
  973.     id: pc_moc
  974.     register_type: read
  975.     address: 0x000C
  976.     unit_of_measurement: "W"
  977.     state_class: measurement
  978.     device_class: power
  979.     value_type: FP32
  980.     filters:
  981.       - multiply: 1
  982.     accuracy_decimals: 2
  983.  
  984.   - platform: modbus_controller
  985.     modbus_controller_id: tec
  986.     name: "PC moc bierna"
  987.     id: pc_moc_bierna
  988.     register_type: read
  989.     address: 0x0012
  990.     unit_of_measurement: "var"
  991.     state_class: measurement
  992.     device_class: reactive_power
  993.     value_type: FP32
  994.     filters:
  995.       - multiply: 1
  996.     accuracy_decimals: 2
  997.  
  998.  
  999.   - platform: modbus_controller
  1000.     modbus_controller_id: tec
  1001.     name: "PC napięcie"
  1002.     id: pc_napiecie
  1003.     register_type: read
  1004.     address: 0x0000
  1005.     unit_of_measurement: "V"
  1006.     state_class: measurement
  1007.     device_class: voltage
  1008.     value_type: FP32
  1009.     filters:
  1010.       - multiply: 1
  1011.     accuracy_decimals: 2
  1012.  
  1013.   - platform: modbus_controller
  1014.     modbus_controller_id: tec
  1015.     name: "PC prąd"
  1016.     id: pc_prad
  1017.     register_type: read
  1018.     address: 0x0006
  1019.     unit_of_measurement: "A"
  1020.     state_class: measurement
  1021.     device_class: current
  1022.     value_type: FP32
  1023.     filters:
  1024.       - multiply: 1
  1025.     accuracy_decimals: 2
  1026.  
  1027.   - platform: modbus_controller
  1028.     modbus_controller_id: tec
  1029.     name: "PC częstotliwość"
  1030.     id: pc_frequency
  1031.     register_type: read
  1032.     address: 0x0030
  1033.     unit_of_measurement: "Hz"
  1034.     state_class: measurement
  1035.     device_class: frequency
  1036.     value_type: FP32
  1037.     filters:
  1038.       - multiply: 1
  1039.     accuracy_decimals: 2
  1040.  
  1041.   - platform: modbus_controller
  1042.     modbus_controller_id: tec
  1043.     name: "PC współczynnik mocy"
  1044.     id: pc_power_factor
  1045.     register_type: read
  1046.     address: 0x001E
  1047.     unit_of_measurement: ""
  1048.     state_class: measurement
  1049.     device_class: power_factor
  1050.     value_type: FP32
  1051.     filters:
  1052.       - multiply: 1
  1053.     accuracy_decimals: 2
  1054.  
  1055.   - platform: modbus_controller
  1056.     modbus_controller_id: tec
  1057.     name: "PC zużycie energii"
  1058.     id: pc_energia
  1059.     register_type: read
  1060.     address: 0x0500
  1061.     unit_of_measurement: "kWh"
  1062.     state_class: total_increasing
  1063.     device_class: energy
  1064.     value_type: FP32
  1065.     filters:
  1066.       - multiply: 1
  1067.     accuracy_decimals: 2
  1068.  
  1069.   - platform: total_daily_energy
  1070.     name: "PC dzienne zużycie energii"
  1071.     power_id: pc_moc
  1072.     unit_of_measurement: "kWh"
  1073.     accuracy_decimals: 3
  1074.     id: pc_daily_kwh
  1075.     #icon: mdi:counter
  1076.     device_class: energy
  1077.     state_class: total_increasing
  1078.     filters:
  1079.      # Multiplication factor from W to kW is 0.001
  1080.       - multiply: 0.001
  1081.  
  1082.   - platform: total_daily_energy
  1083.     name: "PC pompa obiegowa zużycie energii"
  1084.     power_id: pump1_power
  1085.     unit_of_measurement: "kWh"
  1086.     accuracy_decimals: 3
  1087.     id: pompa_obiegowa_co_pobor
  1088.     #icon: mdi:counter
  1089.     device_class: energy
  1090.     state_class: total_increasing
  1091.     filters:
  1092.      # Multiplication factor from W to kW is 0.001
  1093.       - multiply: 0.001
  1094.  
  1095.   - platform: total_daily_energy
  1096.     name: "PC pompa obiegowa 2 zużycie energii"
  1097.     power_id: pump2_power
  1098.     unit_of_measurement: "kWh"
  1099.     accuracy_decimals: 3
  1100.     id: pompa_obiegowa_co2_pobor
  1101.     #icon: mdi:counter
  1102.     device_class: energy
  1103.     state_class: total_increasing
  1104.     filters:
  1105.      # Multiplication factor from W to kW is 0.001
  1106.       - multiply: 0.001
  1107.  
  1108.  
  1109. #######  PC zużycie energii grzanie CO
  1110.   - platform: template
  1111.     name: "PC moc grzanie CO"
  1112.     id: pc_moc_grzanie_co
  1113.     device_class: power
  1114.     state_class: measurement
  1115.     unit_of_measurement: W
  1116.     accuracy_decimals: 2
  1117.     lambda: |-
  1118.       if (id(heating_demand).state) {
  1119.         return id(pc_moc).state;
  1120.       } else {
  1121.         return 0;
  1122.       }
  1123.     update_interval: 5s
  1124.  
  1125.   - platform: total_daily_energy
  1126.     name: "PC dzienne zużycie energii CO"
  1127.     power_id: pc_moc_grzanie_co
  1128.     unit_of_measurement: "kWh"
  1129.     accuracy_decimals: 3
  1130.     id: pc_daily_co_kwh
  1131.     icon: mdi:counter
  1132.     device_class: energy
  1133.     filters:
  1134.      # Multiplication factor from W to kW is 0.001
  1135.       - multiply: 0.001
  1136.  
  1137. #######  PC zużycie energii grzanie CWU
  1138.   - platform: template
  1139.     name: "PC moc grzanie CWU"
  1140.     id: pc_moc_grzanie_cwu
  1141.     device_class: power
  1142.     state_class: measurement
  1143.     unit_of_measurement: W
  1144.     accuracy_decimals: 2
  1145.     lambda: |-
  1146.       if (id(hotwater_demand).state) {
  1147.         return id(pc_moc).state;
  1148.       } else {
  1149.         return 0;
  1150.       }
  1151.     update_interval: 5s
  1152.  
  1153.   - platform: total_daily_energy
  1154.     name: "PC dzienne zużycie energii CWU"
  1155.     power_id: pc_moc_grzanie_cwu
  1156.     unit_of_measurement: "kWh"
  1157.     accuracy_decimals: 3
  1158.     id: pc_daily_cwu_kwh
  1159.     icon: mdi:counter
  1160.     device_class: energy
  1161.     filters:
  1162.      # Multiplication factor from W to kW is 0.001
  1163.       - multiply: 0.001
  1164.  
  1165.  
  1166. ############   PZEM-004T V3 grzałka CO
  1167.   - platform: pzemac
  1168.     modbus_id: mod_bus_pzem
  1169.     address: 2
  1170.     current:
  1171.       name: "Grzałka CO prąd"
  1172.       accuracy_decimals: 2
  1173.       id: grzalka_co_prad
  1174.     voltage:
  1175.       name: "Grzałka CO napięcie"
  1176.       unit_of_measurement: V
  1177.       accuracy_decimals: 2
  1178.       id: grzalka_co_napiecie
  1179.     energy:
  1180.       name: "Grzałka CO zużycie energii"
  1181.       filters:
  1182.        # Wh to kWh is 0.001
  1183.         - multiply: 0.001
  1184.       unit_of_measurement: kWh
  1185.       accuracy_decimals: 3
  1186.       id: grzalka_co_energia
  1187.     power:
  1188.       name: "Grzałka CO moc"
  1189.       unit_of_measurement: W
  1190.       accuracy_decimals: 2
  1191.       id: grzalka_co_moc
  1192.     frequency:
  1193.       name: "Grzałka CO częstotliwość"
  1194.       unit_of_measurement: Hz
  1195.       accuracy_decimals: 2
  1196.     power_factor:
  1197.       name: "Grzałka CO współczynnik mocy"
  1198.       accuracy_decimals: 2
  1199.       id: grzalka_co_power_factor
  1200.     update_interval: 5s
  1201.  
  1202.   - platform: total_daily_energy
  1203.     name: "Grzałka CO dzienne zużycie energii"
  1204.     power_id: grzalka_co_moc
  1205.     unit_of_measurement: "kWh"
  1206.     accuracy_decimals: 3
  1207.     id: grzalka_co_daily_kwh
  1208.     icon: mdi:counter
  1209.     device_class: energy
  1210.     filters:
  1211.      # Multiplication factor from W to kW is 0.001
  1212.       - multiply: 0.001
  1213.  
  1214. ############   PZEM-004T V3 grzałka CWU
  1215.   - platform: pzemac
  1216.     modbus_id: mod_bus_pzem
  1217.     address: 3
  1218.     current:
  1219.       name: "Grzałka CWU prąd"
  1220.       accuracy_decimals: 2
  1221.       id: grzalka_cwu_prad
  1222.     voltage:
  1223.       name: "Grzałka CWU napięcie"
  1224.       unit_of_measurement: V
  1225.       accuracy_decimals: 2
  1226.       id: grzalka_cwu_napiecie
  1227.     energy:
  1228.       name: "Grzałka CWU zużycie energii"
  1229.       filters:
  1230.        # Wh to kWh is 0.001
  1231.         - multiply: 0.001
  1232.       unit_of_measurement: kWh
  1233.       accuracy_decimals: 3
  1234.       id: grzalka_cwu_energia
  1235.     power:
  1236.       name: "Grzałka CWU moc"
  1237.       unit_of_measurement: W
  1238.       accuracy_decimals: 2
  1239.       id: grzalka_cwu_moc
  1240.     frequency:
  1241.       name: "Grzałka CWU częstotliwość"
  1242.       unit_of_measurement: Hz
  1243.       accuracy_decimals: 2
  1244.     power_factor:
  1245.       name: "Grzałka CWU współczynnik mocy"
  1246.       accuracy_decimals: 2
  1247.       id: grzalka_cwu_power_factor
  1248.     update_interval: 5s
  1249.  
  1250.   - platform: total_daily_energy
  1251.     name: "Grzałka CWU dzienne zużycie energii"
  1252.     power_id: grzalka_cwu_moc
  1253.     unit_of_measurement: "kWh"
  1254.     accuracy_decimals: 3
  1255.     id: grzalka_cwu_daily_kwh
  1256.     icon: mdi:counter
  1257.     device_class: energy
  1258.     filters:
  1259.      # Multiplication factor from W to kW is 0.001
  1260.       - multiply: 0.001
  1261.  
  1262. ###########################################################################
  1263.   - platform: dallas_temp
  1264.     address: 0x3c3c01d0759f0e28
  1265.     name: "Temperatura CWU Dallas"
  1266.     id: temp_cwu_dallas
  1267.     accuracy_decimals: 1
  1268.     update_interval: 30s
  1269.  
  1270.   - platform: dallas_temp
  1271.     address: 0xad3c01d07525e328
  1272.     name: "Temperatura CO Dallas"
  1273.     id: temp_co_dallas
  1274.     accuracy_decimals: 1
  1275.     update_interval: 30s
  1276.  
  1277.   - platform: pulse_counter
  1278.     pin:
  1279.         number: GPIO13
  1280.         inverted: true
  1281.         mode:
  1282.          input: true
  1283.          pullup: true
  1284.          
  1285.     id: flow_rate
  1286.     name: "Przepływomierz PC"
  1287.     state_class: measurement
  1288.     unit_of_measurement: "L/hr"
  1289.     #icon: "${ha_icon}"
  1290.     #timeout: 7s
  1291.     use_pcnt: true
  1292.     #internal_filter: 10 ms
  1293.     accuracy_decimals: 3
  1294.     #internal_filter_mode: PULSE
  1295.     update_interval: 5s
  1296.     filters:
  1297.       - lambda: return (x / 27.0) * 60.0; #F(Hz)=(0,45*Q)
  1298.      # - median:
  1299.        #   window_size: 10
  1300.          # send_every: 7
  1301. #           #send_first_at: 3
  1302.       #- throttle: 5s
  1303.      # - debounce: 100ms
  1304.      # - clamp:
  1305.        #   min_value: 700
  1306.      #     max_value: 2000
  1307.       #    ignore_out_of_range: true
  1308.     #  - throttle_average: 5s
  1309.  
  1310.    # total:
  1311.  #     name: "Wodomierz PC"
  1312.     #  id: total_water_pc
  1313.      # unit_of_measurement: "m³"
  1314.      # device_class: water
  1315.       #state_class: total_increasing
  1316.      # accuracy_decimals: 3
  1317.       #icon: "${ha_icon}"
  1318.      # filters:
  1319.     #    - lambda: return (x / 27000.0);
  1320.  
  1321. #   - platform: pulse_counter
  1322. #     pin:
  1323. #       number: GPIO13
  1324. #       mode:
  1325. #         input: true
  1326. #         pullup: true
  1327. #     id: flow_rate
  1328. #     name: "Przepływomierz PC"
  1329. #     unit_of_measurement: "L/hr"
  1330. #     use_pcnt: true
  1331. #     accuracy_decimals: 3
  1332. #     count_mode:
  1333. #       rising_edge: INCREMENT
  1334. #       falling_edge: disable
  1335. #     update_interval: 1s
  1336. #     filters:
  1337. #       - lambda: return (x / 27.0) * 60.0; #F(Hz)=(0,45*Q)
  1338.     #   - clamp:
  1339.     #       min_value: 700
  1340.     #       max_value: 1800
  1341.     #       ignore_out_of_range: true
  1342. #     total:
  1343. #       name: "Wodomierz PC"
  1344. #       id: total_water_pc
  1345. #       unit_of_measurement: "m³"
  1346. #       device_class: water
  1347. #       state_class: total_increasing
  1348. #       accuracy_decimals: 3
  1349. #       #icon: "${ha_icon}"
  1350. #       filters:
  1351. #         - lambda: return (x / 27000.0);
  1352.  
  1353.   - platform: wifi_signal
  1354.     name: ${friendly_name} RSSI
  1355.     update_interval: 60s
  1356.     id: wifi_signal_db
  1357.     entity_category: "diagnostic"
  1358.  
  1359.   - platform: copy # Reports the WiFi signal strength in %
  1360.     source_id: wifi_signal_db
  1361.     name: "WiFi Signal Percent"
  1362.     filters:
  1363.       - lambda: return min(max(2 * (x + 100.0), 0.0), 100.0);
  1364.     unit_of_measurement: "%"
  1365.     entity_category: "diagnostic"
  1366.     device_class: ""
  1367.  
  1368.   - platform: uptime
  1369.     id: uptime_sensor
  1370.     internal: True
  1371.     update_interval: 60s
  1372.     on_raw_value:
  1373.       then:
  1374.         - text_sensor.template.publish:
  1375.             id: uptime_human
  1376.             state: !lambda |-
  1377.               int seconds = round(id(uptime_sensor).raw_state);
  1378.               int days = seconds / (24 * 3600);
  1379.               seconds = seconds % (24 * 3600);
  1380.               int hours = seconds / 3600;
  1381.               seconds = seconds % 3600;
  1382.               int minutes = seconds /  60;
  1383.               seconds = seconds % 60;
  1384.               return (
  1385.                 (days ? to_string(days) + "d " : "") +
  1386.                 (hours ? to_string(hours) + "h " : "") +
  1387.                 (minutes ? to_string(minutes) + "m " : "") +
  1388.                 (to_string(seconds) + "s")
  1389.               ).c_str();
  1390.  
  1391.   #- platform: modbus_controller
  1392.    # modbus_controller_id: sprsun_pc
  1393.    # name: ${friendly_name} Czas pracy
  1394.    # id: work_time_pc
  1395.   #  register_type: holding
  1396.    # address: 0x0000
  1397.    # unit_of_measurement: "h"
  1398.     #device_class: "temperature"
  1399.    # value_type: U_WORD
  1400.    # filters:
  1401.    #  - lambda: return x * 1;
  1402.    # accuracy_decimals: 0
  1403.  
  1404.   - platform: modbus_controller
  1405.     modbus_controller_id: sprsun_pc
  1406.     name: ${friendly_name} Temperatura powrotu
  1407.     id: inlet_temp
  1408.     register_type: holding
  1409.     address: 0x000E
  1410.     unit_of_measurement: "°C"
  1411.     device_class: "temperature"
  1412.     value_type: S_WORD
  1413.     filters:
  1414.       - lambda: return x * 0.1;
  1415.     accuracy_decimals: 2
  1416.    
  1417.   - platform: modbus_controller
  1418.     modbus_controller_id: sprsun_pc
  1419.     name: ${friendly_name} Temperatura CWU
  1420.     id: hotwater_temp
  1421.     register_type: holding
  1422.     address: 0x000F
  1423.     unit_of_measurement: "°C"
  1424.     device_class: "temperature"
  1425.     value_type: S_WORD
  1426.     filters:
  1427.       - lambda: return x * 0.1;
  1428.     accuracy_decimals: 2
  1429.  
  1430.   - platform: modbus_controller
  1431.     modbus_controller_id: sprsun_pc
  1432.     name: ${friendly_name} Temperatura zewnętrzna
  1433.     id: ambi_temp
  1434.     register_type: holding
  1435.     address: 0x0011
  1436.     unit_of_measurement: "°C"
  1437.     device_class: "temperature"
  1438.     value_type: S_WORD
  1439.     filters:
  1440.       - lambda: return x * 0.5;
  1441.     accuracy_decimals: 2
  1442.  
  1443.   - platform: modbus_controller
  1444.     modbus_controller_id: sprsun_pc
  1445.     name: ${friendly_name} Temperatura zasilania
  1446.     id: outlet_temp
  1447.     register_type: holding
  1448.     address: 0x0012
  1449.     unit_of_measurement: "°C"
  1450.     device_class: "temperature"
  1451.     value_type: S_WORD
  1452.     filters:
  1453.       - lambda: return x * 0.1;
  1454.     accuracy_decimals: 2
  1455.  
  1456.   - platform: template
  1457.     name: ${friendly_name} delta woda
  1458.     id: delta
  1459.     icon: mdi:delta
  1460.     unit_of_measurement: "°C"
  1461.     device_class: "temperature"
  1462.     accuracy_decimals: 2
  1463.     update_interval: 5s
  1464.     lambda: |-
  1465.       return id(outlet_temp).state - id(inlet_temp).state;
  1466.  
  1467.   - platform: template
  1468.     name: ${friendly_name} moc cieplna
  1469.     id: moc_cieplna
  1470.     unit_of_measurement: "W"
  1471.     device_class: "power"
  1472.     #icon: mdi:power
  1473.     accuracy_decimals: 2
  1474.     update_interval: 5s
  1475.     lambda: |-
  1476.       if (id(number_defrost) == 0 && id(compressor_demand).state && (id(heating_demand).state || id(hotwater_demand).state)) {
  1477.         return id(delta).state * id(flow_rate).state * 4.1899 * 975 / 3600;
  1478.       } else {
  1479.         return 0.00;
  1480.       }
  1481.  
  1482.   - platform: template
  1483.     name: "Moc cieplna CWU"
  1484.     id: moc_cieplna_cwu
  1485.     unit_of_measurement: "W"
  1486.     accuracy_decimals: 2
  1487.     lambda: |-
  1488.       if (id(number_defrost) == 0 && id(compressor_demand).state && id(hotwater_demand).state) {
  1489.         return id(delta).state * id(flow_rate).state * 4.1899 * 975 / 3600;
  1490.       } else {
  1491.         return 0.00;
  1492.       }
  1493.  
  1494.   - platform: template
  1495.     name: "Moc cieplna CO"
  1496.     id: moc_cieplna_co
  1497.     unit_of_measurement: "W"
  1498.     accuracy_decimals: 2
  1499.     lambda: |-
  1500.       if (id(number_defrost) == 0 && id(compressor_demand).state && id(heating_demand).state) {
  1501.         return id(delta).state * id(flow_rate).state * 4.1899 * 975 / 3600;
  1502.       } else {
  1503.         return 0.00;
  1504.       }
  1505.  
  1506.    #przepływ: 1100-1440
  1507.    #  if (!id(defrost).state && (id(heating_demand).state || id(hotwater_demand).state)) {
  1508.  
  1509.   - platform: template
  1510.     name: ${friendly_name} Współczynnik COP
  1511.     id: cop
  1512.     #unit_of_measurement: "W"
  1513.     #device_class: "measurement"
  1514.     #icon: mdi:power
  1515.     filters:
  1516.       - clamp:
  1517.           min_value: 0
  1518.           max_value: 10
  1519.           ignore_out_of_range: true
  1520.     state_class: "measurement"
  1521.     accuracy_decimals: 2
  1522.     update_interval: 5s  
  1523.     lambda: |-
  1524.       if (id(number_defrost) == 0 && (id(heating_demand).state || id(hotwater_demand).state)) {
  1525.         return id(moc_cieplna).state / id(pc_moc).state;
  1526.       } else {
  1527.         return 0.00;
  1528.       }
  1529.  
  1530.   - platform: template
  1531.     name: ${friendly_name} Współczynnik COP dla CO
  1532.     id: cop_co
  1533.     #unit_of_measurement: "W"
  1534.     #device_class: "power"
  1535.     #icon: mdi:power
  1536.     state_class: "measurement"
  1537.     accuracy_decimals: 2
  1538.     update_interval: 5s  
  1539.     filters:
  1540.       - clamp:
  1541.           min_value: 0
  1542.           max_value: 10
  1543.           ignore_out_of_range: true
  1544.     lambda: |-
  1545.       if ((id(heating_demand).state) and id(number_defrost) == 0) {
  1546.         return id(moc_cieplna).state / id(pc_moc).state;
  1547.       } else {
  1548.         return 0.00;
  1549.       }
  1550.  
  1551.   - platform: template
  1552.     name: ${friendly_name} Współczynnik COP dla CWU
  1553.     id: cop_cwu
  1554.     #unit_of_measurement: "W"
  1555.     #device_class: "power"
  1556.     #icon: mdi:power
  1557.     state_class: "measurement"
  1558.     accuracy_decimals: 2
  1559.     update_interval: 5s  
  1560.     filters:
  1561.       - clamp:
  1562.           min_value: 0
  1563.           max_value: 10
  1564.           ignore_out_of_range: true
  1565.     lambda: |-
  1566.       if ((id(hotwater_demand).state) and id(number_defrost) == 0) {
  1567.         return id(moc_cieplna).state / id(pc_moc).state;
  1568.       } else {
  1569.         return 0.00;
  1570.       }
  1571.  
  1572.   - platform: modbus_controller
  1573.     modbus_controller_id: sprsun_pc
  1574.     name: ${friendly_name} Temperatura gazu - wlot
  1575.     id: suct_gas_temp
  1576.     register_type: holding
  1577.     address: 0x0015
  1578.     unit_of_measurement: "°C"
  1579.     device_class: "temperature"
  1580.     value_type: S_WORD
  1581.     filters:
  1582.       - lambda: return x * 0.5;
  1583.     accuracy_decimals: 2
  1584.  
  1585.   - platform: modbus_controller
  1586.     modbus_controller_id: sprsun_pc
  1587.     name: ${friendly_name} Temperatura odparowania (Coil temp.)
  1588.     id: coil_temp
  1589.     register_type: holding
  1590.     address: 0x0016
  1591.     unit_of_measurement: "°C"
  1592.     device_class: "temperature"
  1593.     value_type: S_WORD
  1594.     filters:
  1595.       - lambda: return x * 0.5;
  1596.     accuracy_decimals: 2
  1597.    
  1598.    
  1599.   - platform: modbus_controller
  1600.     modbus_controller_id: sprsun_pc
  1601.     name: ${friendly_name} Moc pobierana
  1602.     id: power_w
  1603.     register_type: holding
  1604.     address: 0x0017
  1605.     unit_of_measurement: "W"
  1606.     device_class: "power"
  1607.     value_type: U_WORD
  1608.     filters:
  1609.       - lambda: return x * 1.0;
  1610.     accuracy_decimals: 2
  1611.  
  1612.   - platform: modbus_controller
  1613.     modbus_controller_id: sprsun_pc
  1614.     name: ${friendly_name} Temperatura gazu - wylot
  1615.     id: exhaust_temp
  1616.     register_type: holding
  1617.     address: 0x001B
  1618.     unit_of_measurement: "°C"
  1619.     device_class: "temperature"
  1620.     value_type: S_WORD
  1621.     filters:
  1622.       - lambda: return x * 1.0;
  1623.     accuracy_decimals: 2
  1624.  
  1625.   - platform: modbus_controller
  1626.     modbus_controller_id: sprsun_pc
  1627.     name: ${friendly_name} EEV 1
  1628.     id: EEV_1_step
  1629.     register_type: holding
  1630.     address: 0x001C
  1631.     unit_of_measurement: "P"
  1632.     device_class: "temperature"
  1633.     value_type: U_WORD
  1634.     filters:
  1635.       - lambda: return x * 1.0;
  1636.     accuracy_decimals: 0
  1637.  
  1638.   - platform: modbus_controller
  1639.     modbus_controller_id: sprsun_pc
  1640.     name: ${friendly_name} EEV 2
  1641.     id: EEV_2_step
  1642.     register_type: holding
  1643.     address: 0x001D
  1644.     unit_of_measurement: "P"
  1645.     device_class: "temperature"
  1646.     value_type: U_WORD
  1647.     filters:
  1648.       - lambda: return x * 1.0;
  1649.     accuracy_decimals: 0
  1650.    
  1651.   - platform: modbus_controller
  1652.     modbus_controller_id: sprsun_pc
  1653.     name: ${friendly_name} Kompresor freq
  1654.     id: comp_frequency
  1655.     register_type: holding
  1656.     address: 0x001E
  1657.     unit_of_measurement: "Hz"
  1658.     device_class: "frequency"
  1659.     value_type: U_WORD
  1660.     filters:
  1661.       - lambda: return x * 1.0;
  1662.     accuracy_decimals: 2
  1663.    
  1664.   - platform: modbus_controller
  1665.     modbus_controller_id: sprsun_pc
  1666.     name: ${friendly_name} Frequency conversion failure 1
  1667.     id: freq_failure_1
  1668.     register_type: holding
  1669.     address: 0x001F
  1670.     #unit_of_measurement: "Hz"
  1671.     #device_class: "frequency"
  1672.     value_type: U_WORD
  1673.     filters:
  1674.       - lambda: return x * 1.0;
  1675.     accuracy_decimals: 2
  1676.  
  1677.   - platform: modbus_controller
  1678.     modbus_controller_id: sprsun_pc
  1679.     name: ${friendly_name} Frequency conversion failure 2
  1680.     id: freq_failure_2
  1681.     register_type: holding
  1682.     address: 0x0020
  1683.     #unit_of_measurement: "Hz"
  1684.     #device_class: "frequency"
  1685.     value_type: U_WORD
  1686.     filters:
  1687.       - lambda: return x * 1.0;
  1688.     accuracy_decimals: 2
  1689.    
  1690.   - platform: modbus_controller
  1691.     modbus_controller_id: sprsun_pc
  1692.     name: ${friendly_name} Napięcie szyny DC
  1693.     id: dc_bus_voltage
  1694.     register_type: holding
  1695.     address: 0x0021
  1696.     unit_of_measurement: "V"
  1697.     device_class: "voltage"
  1698.     value_type: U_WORD
  1699.     filters:
  1700.       - lambda: return x * 1.0;
  1701.     accuracy_decimals: 2
  1702.  
  1703.   - platform: modbus_controller
  1704.     modbus_controller_id: sprsun_pc
  1705.     name: ${friendly_name} Driving temp.
  1706.     id: driving_temp
  1707.     register_type: holding
  1708.     address: 0x0022
  1709.     unit_of_measurement: "°C"
  1710.     device_class: "temperature"
  1711.     value_type: S_WORD
  1712.     filters:
  1713.       - lambda: return x * 0.5;
  1714.     accuracy_decimals: 2
  1715.    
  1716.   - platform: modbus_controller
  1717.     modbus_controller_id: sprsun_pc
  1718.     name: ${friendly_name} Prąd kompresora
  1719.     id: comp_current
  1720.     register_type: holding
  1721.     address: 0x0023
  1722.     unit_of_measurement: "A"
  1723.     device_class: "current"
  1724.     value_type: U_WORD
  1725.     filters:
  1726.       - lambda: return x * 1.0;
  1727.     accuracy_decimals: 2
  1728.    
  1729.   - platform: modbus_controller
  1730.     modbus_controller_id: sprsun_pc
  1731.     name: ${friendly_name} Kompresor zadana
  1732.     id: comp_frequency_target
  1733.     register_type: holding
  1734.     address: 0x0024
  1735.     unit_of_measurement: "Hz"
  1736.     device_class: "frequency"
  1737.     value_type: U_WORD
  1738.     filters:
  1739.       - lambda: return x * 1.0;
  1740.     accuracy_decimals: 2
  1741.    
  1742.   - platform: modbus_controller
  1743.     modbus_controller_id: sprsun_pc
  1744.     name: ${friendly_name} Wentylator 1
  1745.     id: dc_fan_1_speed
  1746.     register_type: holding
  1747.     address: 0x0026
  1748.     unit_of_measurement: "RPM"
  1749.     #device_class: "frequency"
  1750.     value_type: U_WORD
  1751.     filters:
  1752.       - lambda: return x * 1.0;
  1753.     accuracy_decimals: 2
  1754.  
  1755.   - platform: modbus_controller
  1756.     modbus_controller_id: sprsun_pc
  1757.     name: ${friendly_name} Wentylator 2
  1758.     id: dc_fan_2_speed
  1759.     register_type: holding
  1760.     address: 0x0027
  1761.     unit_of_measurement: "RPM"
  1762.     #device_class: "frequency"
  1763.     value_type: U_WORD
  1764.     filters:
  1765.       - lambda: return x * 1.0;
  1766.     accuracy_decimals: 2
  1767.    
  1768.   - platform: modbus_controller
  1769.     modbus_controller_id: sprsun_pc
  1770.     name: ${friendly_name} Temperatura odparowania
  1771.     id: evap_temp
  1772.     register_type: holding
  1773.     address: 0x0028
  1774.     unit_of_measurement: "°C"
  1775.     device_class: "temperature"
  1776.     value_type: S_WORD
  1777.     filters:
  1778.       - lambda: return x * 0.1;
  1779.     accuracy_decimals: 2
  1780.  
  1781.   - platform: modbus_controller
  1782.     modbus_controller_id: sprsun_pc
  1783.     name: ${friendly_name} Temperatura skraplacza
  1784.     id: cond_temp
  1785.     register_type: holding
  1786.     address: 0x0029
  1787.     unit_of_measurement: "°C"
  1788.     device_class: "temperature"
  1789.     value_type: S_WORD
  1790.     filters:
  1791.       - lambda: return x * 0.1;
  1792.     accuracy_decimals: 2
  1793.    
  1794.   - platform: modbus_controller
  1795.     modbus_controller_id: sprsun_pc
  1796.     name: ${friendly_name} Frequency conversion fault 8 bits higher
  1797.     id: freq_conv_fault_8_bits_higher
  1798.     register_type: holding
  1799.     address: 0x002A
  1800.     #unit_of_measurement: "Hz"
  1801.     #device_class: "frequency"
  1802.     value_type: U_WORD
  1803.     filters:
  1804.       - lambda: return x * 1.0;
  1805.     accuracy_decimals: 2
  1806.    
  1807.   - platform: modbus_controller
  1808.     modbus_controller_id: sprsun_pc
  1809.     name: ${friendly_name} Frequency conversion fault 8 bits lower
  1810.     id: freq_conv_fault_8_bits_lower
  1811.     register_type: holding
  1812.     address: 0x002B
  1813.     #unit_of_measurement: "Hz"
  1814.     #device_class: "frequency"
  1815.     value_type: U_WORD
  1816.     filters:
  1817.       - lambda: return x * 1.0;
  1818.     accuracy_decimals: 2
  1819.    
  1820.   - platform: modbus_controller
  1821.     modbus_controller_id: sprsun_pc
  1822.     name: ${friendly_name} Controller Version
  1823.     id: controller_version
  1824.     register_type: holding
  1825.     address: 0x002C
  1826.     #unit_of_measurement: "Hz"
  1827.     #device_class: "frequency"
  1828.     value_type: U_WORD
  1829.     filters:
  1830.       - lambda: return x * 1.0;
  1831.     accuracy_decimals: 0
  1832.     skip_updates: 10
  1833.  
  1834.   - platform: modbus_controller
  1835.     modbus_controller_id: sprsun_pc
  1836.     name: ${friendly_name} Display Version
  1837.     id: display_version
  1838.     register_type: holding
  1839.     address: 0x002D
  1840.     #unit_of_measurement: "Hz"
  1841.     #device_class: "frequency"
  1842.     value_type: U_WORD
  1843.     filters:
  1844.       - lambda: return x * 1.0;
  1845.     accuracy_decimals: 0
  1846.     skip_updates: 10
  1847.  
  1848.   - platform: modbus_controller
  1849.     modbus_controller_id: sprsun_pc
  1850.     name: ${friendly_name} Pompa obiegowa PWM
  1851.     id: dc_pump_speed
  1852.     register_type: holding
  1853.     address: 0x002E
  1854.     unit_of_measurement: "%"
  1855.     #device_class: "frequency"
  1856.     value_type: U_WORD
  1857.     filters:
  1858.       - lambda: return x * 1.0;
  1859.     accuracy_decimals: 1
  1860.  
  1861.   - platform: modbus_controller
  1862.     modbus_controller_id: sprsun_pc
  1863.     name: ${friendly_name} Ciśnienie sprężania
  1864.     id: suct_press
  1865.     register_type: holding
  1866.     address: 0x002F
  1867.     unit_of_measurement: "bar"
  1868.     device_class: "pressure"
  1869.     value_type: U_WORD
  1870.     filters:
  1871.       - multiply: 0.01
  1872.     accuracy_decimals: 1
  1873.  
  1874.   - platform: modbus_controller
  1875.     modbus_controller_id: sprsun_pc
  1876.     name: ${friendly_name} Ciśnienie rozprężania
  1877.     id: disch_press
  1878.     register_type: holding
  1879.     address: 0x0030
  1880.     unit_of_measurement: "bar"
  1881.     device_class: "pressure"
  1882.     value_type: U_WORD
  1883.     filters:
  1884.       - multiply: 0.01
  1885.     accuracy_decimals: 1
  1886.  
  1887.   - platform: modbus_controller
  1888.     modbus_controller_id: sprsun_pc
  1889.     name: ${friendly_name} Wentylator zadana
  1890.     id: dc_fan_target
  1891.     register_type: holding
  1892.     address: 0x0031
  1893.     unit_of_measurement: "RPM"
  1894.     #device_class: "frequency"
  1895.     value_type: U_WORD
  1896.     filters:
  1897.       - lambda: return x * 1.0;
  1898.     accuracy_decimals: 0
  1899.  
  1900.  
  1901. select:
  1902.   - platform: modbus_controller
  1903.     modbus_controller_id: sprsun_pc
  1904.     name: ${friendly_name} Tryb jednostki
  1905.     #icon: "mdi:fan"
  1906.     id: p06_unit_mode
  1907.     address: 0x0036
  1908.     entity_category: config
  1909.     value_type: U_WORD
  1910.     optimistic: false
  1911.     skip_updates: 6
  1912.     optionsmap:
  1913.       "CWU": 0
  1914.       "Grzanie": 1
  1915.       "Chłodzenie": 2
  1916.       "Grzanie + CWU": 3
  1917.       "Chłodzenie + CWU": 4
  1918.  
  1919.   - platform: modbus_controller
  1920.     modbus_controller_id: sprsun_pc
  1921.     name: ${friendly_name} Tryb pompy obiegowej m/a
  1922.     #icon: "mdi:fan"
  1923.     id: f13_dc_pump_mode
  1924.     address: 0x0186
  1925.     entity_category: config
  1926.     value_type: U_WORD
  1927.     optimistic: false
  1928.     skip_updates: 6
  1929.     optionsmap:
  1930.       "Manual": 0
  1931.       "Auto": 1
  1932.  
  1933.   - platform: modbus_controller
  1934.     modbus_controller_id: sprsun_pc
  1935.     name: ${friendly_name} Tryb kompresora
  1936.     #icon: "mdi:fan"
  1937.     id: f23_compressor_mode
  1938.     address: 0x0190
  1939.     entity_category: config
  1940.     value_type: U_WORD
  1941.     optimistic: false
  1942.     skip_updates: 6
  1943.     optionsmap:
  1944.       "Dzienny": 0
  1945.       "ECO": 1
  1946.       "Nocny": 2
  1947.       "Testowy": 3
  1948.  
  1949.   - platform: modbus_controller
  1950.     modbus_controller_id: sprsun_pc
  1951.     name: ${friendly_name} Przełącznik grzanie/chłodzenie od temp zewnętrznej
  1952.     #icon: "mdi:fan"
  1953.     id: g09_enable_switch
  1954.     address: 0x0191
  1955.     entity_category: config
  1956.     value_type: U_WORD
  1957.     optimistic: false
  1958.     skip_updates: 10
  1959.     optionsmap:
  1960.       "Wyłączony": 0
  1961.       "Włączony": 1
  1962.  
  1963.   - platform: modbus_controller
  1964.     modbus_controller_id: sprsun_pc
  1965.     name: ${friendly_name} Dzień sterylizacji legionella
  1966.     #icon: "mdi:fan"
  1967.     id: weekday_of_antilegionella
  1968.     address: 0x019B
  1969.     entity_category: config
  1970.     value_type: U_WORD
  1971.     optimistic: false
  1972.     skip_updates: 10
  1973.     optionsmap:
  1974.       "Niedziela": 0
  1975.       "Poniedziałek": 1
  1976.       "Wtorek": 2
  1977.       "Środa": 3
  1978.       "Czwartek": 4
  1979.       "Piątek": 5
  1980.       "Sobota": 6
  1981.  
  1982. #   - platform: modbus_controller
  1983. #     modbus_controller_id: sprsun_pc
  1984. #     name: ${friendly_name} Dzień przedziału czasowego nr 1
  1985. #     #icon: "mdi:fan"
  1986. #     id: week_set_of_timeband_1
  1987. #     address:  0x01AD
  1988. #     entity_category: config
  1989. #     value_type: U_WORD
  1990. #     optimistic: false
  1991. #     skip_updates: 10
  1992. #     optionsmap:
  1993. #       "Niedziela": 0
  1994. #       "Poniedziałek": 1
  1995. #       "Wtorek": 2
  1996. #       "Środa": 3
  1997. #       "Czwartek": 4
  1998. #       "Piątek": 5
  1999. #       "Sobota": 6
  2000.  
  2001. #   - platform: modbus_controller
  2002. #     modbus_controller_id: sprsun_pc
  2003. #     name: ${friendly_name} Dzień przedziału czasowego nr 2
  2004. #     #icon: "mdi:fan"
  2005. #     id: week_set_of_timeband_2
  2006. #     address:  0x01AE
  2007. #     entity_category: config
  2008. #     value_type: U_WORD
  2009. #     optimistic: false
  2010. #     skip_updates: 10
  2011. #     optionsmap:
  2012. #       "Niedziela": 0
  2013. #       "Poniedziałek": 1
  2014. #       "Wtorek": 2
  2015. #       "Środa": 3
  2016. #       "Czwartek": 4
  2017. #       "Piątek": 5
  2018. #       "Sobota": 6
  2019.  
  2020. #   - platform: modbus_controller
  2021. #     modbus_controller_id: sprsun_pc
  2022. #     name: ${friendly_name} Dzień przedziału czasowego nr 3
  2023. #     #icon: "mdi:fan"
  2024. #     id: week_set_of_timeband_3
  2025. #     address:  0x01AF
  2026. #     entity_category: config
  2027. #     value_type: U_WORD
  2028. #     optimistic: false
  2029. #     skip_updates: 10
  2030. #     optionsmap:
  2031. #       "Niedziela": 0
  2032. #       "Poniedziałek": 1
  2033. #       "Wtorek": 2
  2034. #       "Środa": 3
  2035. #       "Czwartek": 4
  2036. #       "Piątek": 5
  2037. #       "Sobota": 6
  2038.  
  2039.   - platform: modbus_controller
  2040.     modbus_controller_id: sprsun_pc
  2041.     name: ${friendly_name} Tryb pompy obiegowej
  2042.     #icon: "mdi:fan"
  2043.     id: g02_pump_work
  2044.     address: 0x019E
  2045.     entity_category: config
  2046.     value_type: U_WORD
  2047.     optimistic: false
  2048.     skip_updates: 10
  2049.     optionsmap:
  2050.       "Interwał": 0
  2051.       "Ciągła": 1
  2052.       "Na żądanie": 2
  2053.  
  2054. #   - platform: modbus_controller
  2055. #     modbus_controller_id: sprsun_pc
  2056. #     name: ${friendly_name} F56 Model pompy ciepła
  2057. #     #icon: "mdi:fan"
  2058. #     id: f56_model_selection
  2059. #     address:  0x01BA
  2060. #     entity_category: config
  2061. #     value_type: U_WORD
  2062. #     optimistic: false
  2063. #     skip_updates: 10
  2064. #     optionsmap:
  2065. #       "A102508 - CGK025V3L-B 9.5 kW 220V": 1
  2066. #       "A202508 - CGK-025V3L-B 9.5 kW 380V": 2
  2067. #       "A103008 - CGK030V3L-B 12 kW 220V": 3
  2068. #       "A203008 - CGK-030V3L-B 12 kW 380V": 4
  2069. #       "A104008 - CGK040V3L-B 15 kW 220V": 5
  2070. #       "A204008 - CGK-040V3L-B 15 kW 380V": 6
  2071. #       "A105008 - CGK050V3L-B 20 kW 220V": 7
  2072. #       "A205008 - CGK-050V3L-B 20 kW 380V": 8
  2073. #       "A106008 - CGK060V3L-B 22 kW 220V": 9
  2074. #       "A206008 - CGK-060V3L-B 22 kW 380V": 10
  2075.  
  2076. #####################################   PARAMETER MARKER DEFINITION
  2077.   - platform: modbus_controller
  2078.     use_write_multiple: true
  2079.     modbus_controller_id: sprsun_pc
  2080.     name: "Heat pump on/off switch"
  2081.     id: on_off
  2082.     address: 0x0032
  2083.     value_type: U_WORD
  2084.     optionsmap:
  2085.       "OFF": 0
  2086.       "ON": 1
  2087.     lambda: |-
  2088.       //ESP_LOGE("main","Modbus Number incoming value = %d",x);
  2089.       //ESP_LOGE("main","Modbus eval value = %d",(x & 0x0001));
  2090.       if ((x & 0x0001) == 0)
  2091.         return  std::string("OFF");
  2092.       if ((x & 0x0001) == 1)
  2093.         return  std::string("ON");
  2094.       return {};
  2095.     write_lambda: |-
  2096.       //ESP_LOGE("main","Modbus write gets = %d",value);
  2097.       uint16_t unmodified =  id(parameter_marker_definition_raw).state;
  2098.       //ESP_LOGE("main","Modbus write unmodified = %d", unmodified);
  2099.       uint16_t modified = ((unmodified & ~0x0001) | value);
  2100.       //ESP_LOGE("main","Modbus write to write = %d", modified);
  2101.       return modified;
  2102.  
  2103.   - platform: modbus_controller
  2104.     use_write_multiple: true
  2105.     modbus_controller_id: sprsun_pc
  2106.     name: "MV mode 0-Auto, 1-Manual #(bit add: 0x321 - A45)"
  2107.     id: mv_mode
  2108.     address: 0x0032
  2109.     entity_category: config
  2110.     value_type: U_WORD
  2111.     optionsmap:
  2112.       "AUTO": 0
  2113.       "MANUAL": 2
  2114.     lambda: |-
  2115.       //ESP_LOGE("main","Modbus Number incoming value = %d",x);
  2116.       //ESP_LOGE("main","Modbus eval value = %d",(x & 0x0002));
  2117.       if ((x & 0x0002) == 0)
  2118.         return  std::string("AUTO");
  2119.       if ((x & 0x0002) == 2)
  2120.         return  std::string("MANUAL");
  2121.       return {};
  2122.     write_lambda: |-
  2123.       //ESP_LOGE("main","Modbus write gets = %d",value);
  2124.       uint16_t unmodified =  id(parameter_marker_definition_raw).state;
  2125.       //ESP_LOGE("main","Modbus write unmodified = %d", unmodified);
  2126.       uint16_t modified = ((unmodified & ~0x0002) | value);
  2127.       //ESP_LOGE("main","Modbus write to write = %d", modified);
  2128.       return modified;
  2129.  
  2130.   - platform: modbus_controller
  2131.     use_write_multiple: true
  2132.     modbus_controller_id: sprsun_pc
  2133.     name: "Manual frequency selection #(bit add: 0x322)"
  2134.     id: manual_frequency_selection
  2135.     address: 0x0032
  2136.     entity_category: config
  2137.     value_type: U_WORD
  2138.     optionsmap:
  2139.       "OFF": 0
  2140.       "ON": 4
  2141.     lambda: |-
  2142.       //ESP_LOGE("main","Modbus Number incoming value = %d",x);
  2143.       //ESP_LOGE("main","Modbus eval value = %d",(x & 0x0004));
  2144.       if ((x & 0x0004) == 0)
  2145.         return  std::string("OFF");
  2146.       if ((x & 0x0004) == 4)
  2147.         return  std::string("ON");
  2148.       return {};
  2149.     write_lambda: |-
  2150.       //ESP_LOGE("main","Modbus write gets = %d",value);
  2151.       uint16_t unmodified =  id(parameter_marker_definition_raw).state;
  2152.       //ESP_LOGE("main","Modbus write unmodified = %d", unmodified);
  2153.       uint16_t modified = ((unmodified & ~0x0004) | value);
  2154.       //ESP_LOGE("main","Modbus write to write = %d", modified);
  2155.       return modified;
  2156.  
  2157.   - platform: modbus_controller
  2158.     use_write_multiple: true
  2159.     modbus_controller_id: sprsun_pc
  2160.     name: "AV Mode 0-Auto, 1-Manual #(bit add: 0x325 - B01)"
  2161.     id: av_mode
  2162.     address: 0x0032
  2163.     entity_category: config
  2164.     value_type: U_WORD
  2165.     optionsmap:
  2166.       "AUTO": 0
  2167.       "MANUAL": 32
  2168.     lambda: |-
  2169.       //ESP_LOGE("main","Modbus Number incoming value = %d",x);
  2170.       //ESP_LOGE("main","Modbus eval value = %d",(x & 0x0020));
  2171.       if ((x & 0x0020) == 0)
  2172.         return  std::string("AUTO");
  2173.       if ((x & 0x0020) == 32)
  2174.         return  std::string("MANUAL");
  2175.       return {};
  2176.     write_lambda: |-
  2177.       //ESP_LOGE("main","Modbus write gets = %d",value);
  2178.       uint16_t unmodified =  id(parameter_marker_definition_raw).state;
  2179.       //ESP_LOGE("main","Modbus write unmodified = %d", unmodified);
  2180.       uint16_t modified = ((unmodified & ~0x0020) | value);
  2181.       //ESP_LOGE("main","Modbus write to write = %d", modified);
  2182.       return modified;
  2183.  
  2184.   - platform: modbus_controller
  2185.     use_write_multiple: true
  2186.     modbus_controller_id: sprsun_pc
  2187.     name: "AV init outlet setpoint #(bit add: 0x326 - B93)"
  2188.     id: av_init_outlet_stp
  2189.     address: 0x0032
  2190.     entity_category: config
  2191.     value_type: U_WORD
  2192.     optionsmap:
  2193.       "OFF": 0
  2194.       "ON": 64
  2195.     lambda: |-
  2196.       //ESP_LOGE("main","Modbus Number incoming value = %d",x);
  2197.       //ESP_LOGE("main","Modbus eval value = %d",(x & 0x0040));
  2198.       if ((x & 0x0040) == 0)
  2199.         return  std::string("OFF");
  2200.       if ((x & 0x0040) == 64)
  2201.         return  std::string("ON");
  2202.       return {};
  2203.     write_lambda: |-
  2204.       //ESP_LOGE("main","Modbus write gets = %d",value);
  2205.       uint16_t unmodified =  id(parameter_marker_definition_raw).state;
  2206.       //ESP_LOGE("main","Modbus write unmodified = %d", unmodified);
  2207.       uint16_t modified = ((unmodified & ~0x0040) | value);
  2208.       //ESP_LOGE("main","Modbus write to write = %d", modified);
  2209.       return modified;
  2210.  
  2211. ############################################    CONTROL MARK 1
  2212.   - platform: modbus_controller
  2213.     use_write_multiple: true
  2214.     modbus_controller_id: sprsun_pc
  2215.     name: "Constant freq adj 0-NO, 1-YES #bit add: 0x0330 - R29"
  2216.     id: constant_freq_adj
  2217.     address: 0x0033
  2218.     entity_category: config
  2219.     value_type: U_WORD
  2220.     optionsmap:
  2221.       "NO": 0
  2222.       "YES": 1
  2223.     lambda: |-
  2224.       //ESP_LOGE("main","Modbus Number incoming value = %d",x);
  2225.       //ESP_LOGE("main","Modbus eval value = %d",(x & 0x0001));
  2226.       if ((x & 0x0001) == 0)
  2227.         return  std::string("NO");
  2228.       if ((x & 0x0001) == 1)
  2229.         return  std::string("YES");
  2230.       return {};
  2231.     write_lambda: |-
  2232.       //ESP_LOGE("main","Modbus write gets = %d",value);
  2233.       uint16_t unmodified =  id(control_mark_1_raw).state;
  2234.       //ESP_LOGE("main","Modbus write unmodified = %d", unmodified);
  2235.       uint16_t modified = ((unmodified & ~0x0001) | value);
  2236.       //ESP_LOGE("main","Modbus write to write = %d", modified);
  2237.       return modified;
  2238.  
  2239.   - platform: modbus_controller
  2240.     use_write_multiple: true
  2241.     modbus_controller_id: sprsun_pc
  2242.     name: "Pressure switch enable 0-unuse, 1-use #bit add: 0x0331 - F01"
  2243.     id: pressure_switch_enable
  2244.     address: 0x0033
  2245.     entity_category: config
  2246.     value_type: U_WORD
  2247.     optionsmap:
  2248.       "UNUSE": 0
  2249.       "USE": 2
  2250.     lambda: |-
  2251.       //ESP_LOGE("main","Modbus Number incoming value = %d",x);
  2252.       //ESP_LOGE("main","Modbus eval value = %d",(x & 0x0002));
  2253.       if ((x & 0x0002) == 0)
  2254.         return  std::string("UNUSE");
  2255.       if ((x & 0x0002) == 2)
  2256.         return  std::string("USE");
  2257.       return {};
  2258.     write_lambda: |-
  2259.       //ESP_LOGE("main","Modbus write gets = %d",value);
  2260.       uint16_t unmodified =  id(control_mark_1_raw).state;
  2261.       //ESP_LOGE("main","Modbus write unmodified = %d", unmodified);
  2262.       uint16_t modified = ((unmodified & ~0x0002) | value);
  2263.       //ESP_LOGE("main","Modbus write to write = %d", modified);
  2264.       return modified;
  2265.  
  2266.   - platform: modbus_controller
  2267.     use_write_multiple: true
  2268.     modbus_controller_id: sprsun_pc
  2269.     name: "AV cool enable 0-use, 1-unuse #bit add: 0x0332 - B74"
  2270.     id: av_cool_enable
  2271.     address: 0x0033
  2272.     entity_category: config
  2273.     value_type: U_WORD
  2274.     optionsmap:
  2275.       "UNUSE": 0
  2276.       "USE": 4
  2277.     lambda: |-
  2278.       //ESP_LOGE("main","Modbus Number incoming value = %d",x);
  2279.       //ESP_LOGE("main","Modbus eval value = %d",(x & 0x0004));
  2280.       if ((x & 0x0004) == 0)
  2281.         return  std::string("UNUSE");
  2282.       if ((x & 0x0004) == 4)
  2283.         return  std::string("USE");
  2284.       return {};
  2285.     write_lambda: |-
  2286.       //ESP_LOGE("main","Modbus write gets = %d",value);
  2287.       uint16_t unmodified =  id(control_mark_1_raw).state;
  2288.       //ESP_LOGE("main","Modbus write unmodified = %d", unmodified);
  2289.       uint16_t modified = ((unmodified & ~0x0004) | value);
  2290.       //ESP_LOGE("main","Modbus write to write = %d", modified);
  2291.       return modified;
  2292.  
  2293.   - platform: modbus_controller
  2294.     use_write_multiple: true
  2295.     modbus_controller_id: sprsun_pc
  2296.     name: "AV control mode 0-enhan, 1-exhau #bit add: 0x0333 - B92"
  2297.     id: av_control_mode
  2298.     address: 0x0033
  2299.     entity_category: config
  2300.     value_type: U_WORD
  2301.     optionsmap:
  2302.       "ENHAN": 0
  2303.       "EXHAU": 8
  2304.     lambda: |-
  2305.       //ESP_LOGE("main","Modbus Number incoming value = %d",x);
  2306.       //ESP_LOGE("main","Modbus eval value = %d",(x & 0x0008));
  2307.       if ((x & 0x0008) == 0)
  2308.         return  std::string("ENHAN");
  2309.       if ((x & 0x0008) == 8)
  2310.         return  std::string("EXHAU");
  2311.       return {};
  2312.     write_lambda: |-
  2313.       //ESP_LOGE("main","Modbus write gets = %d",value);
  2314.       uint16_t unmodified =  id(control_mark_1_raw).state;
  2315.       //ESP_LOGE("main","Modbus write unmodified = %d", unmodified);
  2316.       uint16_t modified = ((unmodified & ~0x0008) | value);
  2317.       //ESP_LOGE("main","Modbus write to write = %d", modified);
  2318.       return modified;
  2319.  
  2320.   - platform: modbus_controller
  2321.     use_write_multiple: true
  2322.     modbus_controller_id: sprsun_pc
  2323.     name: "DC fan 1 enable 0-Unuse, 1-Use #bit add: 0x0334 - D01"
  2324.     id: dc_fan_1_enable
  2325.     address: 0x0033
  2326.     entity_category: config
  2327.     value_type: U_WORD
  2328.     optionsmap:
  2329.       "UNUSE": 0
  2330.       "USE": 16
  2331.     lambda: |-
  2332.       //ESP_LOGE("main","Modbus Number incoming value = %d",x);
  2333.       //ESP_LOGE("main","Modbus eval value = %d",(x & 0x0010));
  2334.       if ((x & 0x0010) == 0)
  2335.         return  std::string("UNUSE");
  2336.       if ((x & 0x0010) == 16)
  2337.         return  std::string("USE");
  2338.       return {};
  2339.     write_lambda: |-
  2340.       //ESP_LOGE("main","Modbus write gets = %d",value);
  2341.       uint16_t unmodified =  id(control_mark_1_raw).state;
  2342.       //ESP_LOGE("main","Modbus write unmodified = %d", unmodified);
  2343.       uint16_t modified = ((unmodified & ~0x0010) | value);
  2344.       //ESP_LOGE("main","Modbus write to write = %d", modified);
  2345.       return modified;
  2346.  
  2347.   - platform: modbus_controller
  2348.     use_write_multiple: true
  2349.     modbus_controller_id: sprsun_pc
  2350.     name: "DC fan 2 enable 0-Unuse, 1-Use #bit add: 0x0335 - D02"
  2351.     id: dc_fan_2_enable
  2352.     address: 0x0033
  2353.     entity_category: config
  2354.     value_type: U_WORD
  2355.     optionsmap:
  2356.       "UNUSE": 0
  2357.       "USE": 32
  2358.     lambda: |-
  2359.       //ESP_LOGE("main","Modbus Number incoming value = %d",x);
  2360.       //ESP_LOGE("main","Modbus eval value = %d",(x & 0x0020));
  2361.       if ((x & 0x0020) == 0)
  2362.         return  std::string("UNUSE");
  2363.       if ((x & 0x0020) == 32)
  2364.         return  std::string("USE");
  2365.       return {};
  2366.     write_lambda: |-
  2367.       //ESP_LOGE("main","Modbus write gets = %d",value);
  2368.       uint16_t unmodified =  id(control_mark_1_raw).state;
  2369.       //ESP_LOGE("main","Modbus write unmodified = %d", unmodified);
  2370.       uint16_t modified = ((unmodified & ~0x0020) | value);
  2371.       //ESP_LOGE("main","Modbus write to write = %d", modified);
  2372.       return modified;
  2373.  
  2374.   - platform: modbus_controller
  2375.     use_write_multiple: true
  2376.     modbus_controller_id: sprsun_pc
  2377.     name: "Parameters reset 0-Unuse, 1-Use #bit add: 0x0336"
  2378.     id: parameters_reset
  2379.     address: 0x0033
  2380.     entity_category: config
  2381.     value_type: U_WORD
  2382.     optionsmap:
  2383.       "UNUSE": 0
  2384.       "USE": 64
  2385.     lambda: |-
  2386.       //ESP_LOGE("main","Modbus Number incoming value = %d",x);
  2387.       //ESP_LOGE("main","Modbus eval value = %d",(x & 0x0040));
  2388.       if ((x & 0x0040) == 0)
  2389.         return  std::string("UNUSE");
  2390.       if ((x & 0x0040) == 64)
  2391.         return  std::string("USE");
  2392.       return {};
  2393.     write_lambda: |-
  2394.       //ESP_LOGE("main","Modbus write gets = %d",value);
  2395.       uint16_t unmodified =  id(control_mark_1_raw).state;
  2396.       //ESP_LOGE("main","Modbus write unmodified = %d", unmodified);
  2397.       uint16_t modified = ((unmodified & ~0x0040) | value);
  2398.       //ESP_LOGE("main","Modbus write to write = %d", modified);
  2399.       return modified;
  2400.  
  2401.   - platform: modbus_controller
  2402.     use_write_multiple: true
  2403.     modbus_controller_id: sprsun_pc
  2404.     name: "Failure reset 0-Unuse, 1-Use #bit add: 0x0337"
  2405.     id: failure_reset
  2406.     address: 0x0033
  2407.     entity_category: config
  2408.     value_type: U_WORD
  2409.     optionsmap:
  2410.       "UNUSE": 0
  2411.       "USE": 128
  2412.     lambda: |-
  2413.       //ESP_LOGE("main","Modbus Number incoming value = %d",x);
  2414.       //ESP_LOGE("main","Modbus eval value = %d",(x & 0x0080));
  2415.       if ((x & 0x0080) == 0)
  2416.         return  std::string("UNUSE");
  2417.       if ((x & 0x0080) == 128)
  2418.         return  std::string("USE");
  2419.       return {};
  2420.     write_lambda: |-
  2421.       //ESP_LOGE("main","Modbus write gets = %d",value);
  2422.       uint16_t unmodified =  id(control_mark_1_raw).state;
  2423.       //ESP_LOGE("main","Modbus write unmodified = %d", unmodified);
  2424.       uint16_t modified = ((unmodified & ~0x0080) | value);
  2425.       //ESP_LOGE("main","Modbus write to write = %d", modified);
  2426.       return modified;
  2427.  
  2428. ############################################     CONTROL MARK 2
  2429.   - platform: modbus_controller
  2430.     use_write_multiple: true
  2431.     modbus_controller_id: sprsun_pc
  2432.     name: "Antilegionella Enable 0-Unuse, 1-Use #bit add: 0x0340"
  2433.     id: antilegionella_enable
  2434.     address: 0x0034
  2435.     entity_category: config
  2436.     value_type: U_WORD
  2437.     optionsmap:
  2438.       "UNUSE": 0
  2439.       "USE": 1
  2440.     lambda: |-
  2441.       //ESP_LOGE("main","Modbus Number incoming value = %d",x);
  2442.       //ESP_LOGE("main","Modbus eval value = %d",(x & 0x0001));
  2443.       if ((x & 0x0001) == 0)
  2444.         return  std::string("UNUSE");
  2445.       if ((x & 0x0001) == 1)
  2446.         return  std::string("USE");
  2447.       return {};
  2448.     write_lambda: |-
  2449.       //ESP_LOGE("main","Modbus write gets = %d",value);
  2450.       uint16_t unmodified =  id(control_mark_2_raw).state;
  2451.       //ESP_LOGE("main","Modbus write unmodified = %d", unmodified);
  2452.       uint16_t modified = ((unmodified & ~0x0001) | value);
  2453.       //ESP_LOGE("main","Modbus write to write = %d", modified);
  2454.       return modified;
  2455.  
  2456.   - platform: modbus_controller
  2457.     use_write_multiple: true
  2458.     modbus_controller_id: sprsun_pc
  2459.     name: "Two/Three function 0-Unuse, 1-Use #bit add: 0x0341"
  2460.     id: two_three_function
  2461.     address: 0x0034
  2462.     entity_category: config
  2463.     value_type: U_WORD
  2464.     optionsmap:
  2465.       "UNUSE": 0
  2466.       "USE": 2
  2467.     lambda: |-
  2468.       //ESP_LOGE("main","Modbus Number incoming value = %d",x);
  2469.       //ESP_LOGE("main","Modbus eval value = %d",(x & 0x0002));
  2470.       if ((x & 0x0002) == 0)
  2471.         return  std::string("UNUSE");
  2472.       if ((x & 0x0002) == 2)
  2473.         return  std::string("USE");
  2474.       return {};
  2475.     write_lambda: |-
  2476.       //ESP_LOGE("main","Modbus write gets = %d",value);
  2477.       uint16_t unmodified =  id(control_mark_2_raw).state;
  2478.       //ESP_LOGE("main","Modbus write unmodified = %d", unmodified);
  2479.       uint16_t modified = ((unmodified & ~0x0002) | value);
  2480.       //ESP_LOGE("main","Modbus write to write = %d", modified);
  2481.       return modified;
  2482.  
  2483. ##################################################            TIMEBAND
  2484.   - platform: modbus_controller
  2485.     use_write_multiple: true
  2486.     modbus_controller_id: sprsun_pc
  2487.     name: "Timeband 1 Enable #bit add: 0x0350"
  2488.     id: timeband_1
  2489.     address: 0x0035
  2490.     entity_category: config
  2491.     value_type: U_WORD
  2492.     optionsmap:
  2493.       "OFF": 0
  2494.       "ON": 1
  2495.     lambda: |-
  2496.       //ESP_LOGE("main","Modbus Number incoming value = %d",x);
  2497.       //ESP_LOGE("main","Modbus eval value = %d",(x & 0x0001));
  2498.       if ((x & 0x0001) == 0)
  2499.         return  std::string("OFF");
  2500.       if ((x & 0x0001) == 1)
  2501.         return  std::string("ON");
  2502.       return {};
  2503.     write_lambda: |-
  2504.       //ESP_LOGE("main","Modbus write gets = %d",value);
  2505.       uint16_t unmodified =  id(timeband_raw).state;
  2506.       //ESP_LOGE("main","Modbus write unmodified = %d", unmodified);
  2507.       uint16_t modified = ((unmodified & ~0x0001) | value);
  2508.       //ESP_LOGE("main","Modbus write to write = %d", modified);
  2509.       return modified;
  2510.  
  2511.   - platform: modbus_controller
  2512.     use_write_multiple: true
  2513.     modbus_controller_id: sprsun_pc
  2514.     name: "Timeband 2 Enable #bit add: 0x0351"
  2515.     id: timeband_2
  2516.     address: 0x0035
  2517.     entity_category: config
  2518.     value_type: U_WORD
  2519.     optionsmap:
  2520.       "OFF": 0
  2521.       "ON": 2
  2522.     lambda: |-
  2523.       //ESP_LOGE("main","Modbus Number incoming value = %d",x);
  2524.       //ESP_LOGE("main","Modbus eval value = %d",(x & 0x0002));
  2525.       if ((x & 0x0002) == 0)
  2526.         return  std::string("OFF");
  2527.       if ((x & 0x0002) == 2)
  2528.         return  std::string("ON");
  2529.       return {};
  2530.     write_lambda: |-
  2531.       //ESP_LOGE("main","Modbus write gets = %d",value);
  2532.       uint16_t unmodified =  id(timeband_raw).state;
  2533.       //ESP_LOGE("main","Modbus write unmodified = %d", unmodified);
  2534.       uint16_t modified = ((unmodified & ~0x0002) | value);
  2535.       //ESP_LOGE("main","Modbus write to write = %d", modified);
  2536.       return modified;
  2537.  
  2538.   - platform: modbus_controller
  2539.     use_write_multiple: true
  2540.     modbus_controller_id: sprsun_pc
  2541.     name: "Timeband 3 Enable #bit add: 0x0352"
  2542.     id: timeband_3
  2543.     address: 0x0035
  2544.     entity_category: config
  2545.     value_type: U_WORD
  2546.     optionsmap:
  2547.       "OFF": 0
  2548.       "ON": 4
  2549.     lambda: |-
  2550.       //ESP_LOGE("main","Modbus Number incoming value = %d",x);
  2551.       //ESP_LOGE("main","Modbus eval value = %d",(x & 0x0004));
  2552.       if ((x & 0x0004) == 0)
  2553.         return  std::string("OFF");
  2554.       if ((x & 0x0004) == 4)
  2555.         return  std::string("ON");
  2556.       return {};
  2557.     write_lambda: |-
  2558.       //ESP_LOGE("main","Modbus write gets = %d",value);
  2559.       uint16_t unmodified =  id(timeband_raw).state;
  2560.       //ESP_LOGE("main","Modbus write unmodified = %d", unmodified);
  2561.       uint16_t modified = ((unmodified & ~0x0004) | value);
  2562.       //ESP_LOGE("main","Modbus write to write = %d", modified);
  2563.       return modified;
  2564.  
  2565. ############################################################################
  2566. switch:
  2567.   - platform: gpio
  2568.     pin: 19
  2569.     id: relay_grzalka_co
  2570.     name: "Grzałka CO"
  2571.     icon: "mdi:heat"
  2572.     inverted: True
  2573.  
  2574.   - platform: gpio
  2575.     pin: 21
  2576.     id: relay_grzalka_cwu
  2577.     name: "Grzałka CWU"
  2578.     icon: "mdi:heat"
  2579.     inverted: True
  2580.  
  2581.   - platform: template
  2582.     name: "Sterowanie grzałki CO z PC"
  2583.     id: blokada_grzalka_co
  2584.     restore_mode: RESTORE_DEFAULT_OFF
  2585.     optimistic: true
  2586.     turn_off_action:
  2587.         if:
  2588.           condition:
  2589.             binary_sensor.is_on: grzalka_co
  2590.           then:
  2591.             - switch.turn_off: relay_grzalka_co
  2592.     turn_on_action:
  2593.         if:
  2594.           condition:
  2595.             binary_sensor.is_on: grzalka_co
  2596.           then:
  2597.             - switch.turn_on: relay_grzalka_co
  2598.  
  2599.  
  2600.  
  2601.   - platform: template
  2602.     name: "Sterowanie grzałki CWU z PC"
  2603.     id: blokada_grzalka_cwu
  2604.     restore_mode: RESTORE_DEFAULT_OFF
  2605.     optimistic: true    
  2606.     turn_off_action:
  2607.         if:
  2608.           condition:
  2609.             binary_sensor.is_on: grzalka_cwu
  2610.           then:
  2611.             - switch.turn_off: relay_grzalka_cwu
  2612.     turn_on_action:
  2613.         if:
  2614.           condition:
  2615.             binary_sensor.is_on: grzalka_cwu
  2616.           then:
  2617.             - switch.turn_on: relay_grzalka_cwu
  2618.  
  2619.  
  2620.     #turn_on_action:
  2621.      #   if:
  2622.      #     condition:
  2623.       #      lambda: 'return id(fan_pump2_value) > 0;'
  2624.        #   then:
  2625.          #   - fan.turn_on:
  2626.            #     id: fan_pump2
  2627.            #     speed: !lambda |-
  2628.             #        return id(fan_pump2_value) * 100;
  2629.  
  2630.    
  2631. number:
  2632.  
  2633.     - platform: modbus_controller
  2634.       modbus_controller_id: sprsun_pc
  2635.       name: ${friendly_name} H01 Defrost freq
  2636.       address: 0x0037
  2637.       skip_updates: 10
  2638.       unit_of_measurement: "Hz"
  2639.       id: h01_defrost_freq
  2640.       value_type: U_WORD
  2641.       min_value: 30
  2642.       max_value: 120
  2643.       step: 1
  2644.       mode: box
  2645.       entity_category: config
  2646.  
  2647.     - platform: modbus_controller
  2648.       modbus_controller_id: sprsun_pc
  2649.       name: ${friendly_name} H08 Defrost period 1
  2650.       address: 0x0038
  2651.       skip_updates: 10
  2652.       unit_of_measurement: "MIN"
  2653.       id: h08_defrost_period_1
  2654.       value_type: U_WORD
  2655.       min_value: 10
  2656.       max_value: 120
  2657.       step: 1
  2658.       mode: box
  2659.       entity_category: config  
  2660.  
  2661.     - platform: modbus_controller
  2662.       modbus_controller_id: sprsun_pc
  2663.       name: ${friendly_name} H11 Defrost period 2
  2664.       address: 0x0039
  2665.       skip_updates: 10      
  2666.       unit_of_measurement: "MIN"
  2667.       id: h11_defrost_period_1
  2668.       value_type: U_WORD
  2669.       min_value: 10
  2670.       max_value: 120
  2671.       step: 1
  2672.       mode: box
  2673.       entity_category: config  
  2674.  
  2675.     - platform: modbus_controller
  2676.       modbus_controller_id: sprsun_pc
  2677.       name: ${friendly_name} H11 Defrost period 3
  2678.       address: 0x003A
  2679.       skip_updates: 10      
  2680.       unit_of_measurement: "MIN"
  2681.       id: h14_defrost_period_3
  2682.       value_type: U_WORD
  2683.       min_value: 10
  2684.       max_value: 120
  2685.       step: 1
  2686.       mode: box
  2687.       entity_category: config  
  2688.  
  2689.     - platform: modbus_controller
  2690.       modbus_controller_id: sprsun_pc
  2691.       name: ${friendly_name} H15 Comp total run
  2692.       address: 0x003B
  2693.       skip_updates: 10      
  2694.       unit_of_measurement: "MIN"
  2695.       id: h15_comp_total_run
  2696.       value_type: U_WORD
  2697.       min_value: 1
  2698.       max_value: 300
  2699.       lambda: "return x * 5.0;"
  2700.       write_lambda: "return x / 5.0;"
  2701.       step: 1
  2702.       mode: box
  2703.       entity_category: config
  2704.  
  2705.     - platform: modbus_controller
  2706.       modbus_controller_id: sprsun_pc
  2707.       name: ${friendly_name} H16 Comp continuous run
  2708.       address: 0x003C
  2709.       skip_updates: 10      
  2710.       unit_of_measurement: "MIN"
  2711.       id: h16_comp_continuous_run
  2712.       value_type: U_WORD
  2713.       min_value: 5
  2714.       max_value: 90
  2715.       #lambda: "return x / 5.0;"
  2716.       #write_lambda: "return x * 5.0;"
  2717.       step: 1
  2718.       mode: box
  2719.       entity_category: config
  2720.  
  2721.     - platform: modbus_controller
  2722.       modbus_controller_id: sprsun_pc
  2723.       name: ${friendly_name} H05 Defrost time
  2724.       address: 0x003D
  2725.       skip_updates: 10      
  2726.       unit_of_measurement: "MIN"
  2727.       id: h05_defrost_time
  2728.       value_type: U_WORD
  2729.       min_value: 5
  2730.       max_value: 20
  2731.       #lambda: "return x / 5.0;"
  2732.       #write_lambda: "return x * 5.0;"
  2733.       step: 1
  2734.       mode: box
  2735.       entity_category: config
  2736.  
  2737.     # - platform: modbus_controller
  2738.     #   modbus_controller_id: sprsun_pc
  2739.     #   name: ${friendly_name} A01 MV preiod
  2740.     #   address: 0x003E
  2741.     #   skip_updates: 10      
  2742.     #   unit_of_measurement: "S"
  2743.     #   id: a01_mv_preiod
  2744.     #   value_type: U_WORD
  2745.     #   min_value: 20
  2746.     #   max_value: 90
  2747.     #   #lambda: "return x / 5.0;"
  2748.     #   #write_lambda: "return x * 5.0;"
  2749.     #   step: 1
  2750.     #   mode: box
  2751.     #   entity_category: config
  2752.  
  2753.     # - platform: modbus_controller
  2754.     #   modbus_controller_id: sprsun_pc
  2755.     #   name: ${friendly_name} A14 MV heat initial 0
  2756.     #   address: 0x003F
  2757.     #   skip_updates: 10      
  2758.     #   #unit_of_measurement: "S"
  2759.     #   id: a14_mv_heat_initial_0
  2760.     #   value_type: U_WORD
  2761.     #   min_value: 0
  2762.     #   max_value: 240
  2763.     #   lambda: "return x / 2.0;"
  2764.     #   write_lambda: "return x * 2.0;"
  2765.     #   step: 1
  2766.     #   mode: box
  2767.     #   entity_category: config
  2768.  
  2769.     # - platform: modbus_controller
  2770.     #   modbus_controller_id: sprsun_pc
  2771.     #   name: ${friendly_name} A15 MV heat initial 1
  2772.     #   address: 0x0040
  2773.     #   skip_updates: 10      
  2774.     #   #unit_of_measurement: "S"
  2775.     #   id: a15_mv_heat_initial_1
  2776.     #   value_type: U_WORD
  2777.     #   min_value: 0
  2778.     #   max_value: 240
  2779.     #   lambda: "return x / 2.0;"
  2780.     #   write_lambda: "return x * 2.0;"
  2781.     #   step: 1
  2782.     #   mode: box
  2783.     #   entity_category: config
  2784.  
  2785.     # - platform: modbus_controller
  2786.     #   modbus_controller_id: sprsun_pc
  2787.     #   name: ${friendly_name} A16 MV heat initial 2
  2788.     #   address: 0x0041
  2789.     #   skip_updates: 10      
  2790.     #   #unit_of_measurement: "S"
  2791.     #   id: a16_mv_heat_initial_2
  2792.     #   value_type: U_WORD
  2793.     #   min_value: 0
  2794.     #   max_value: 240
  2795.     #   lambda: "return x / 2.0;"
  2796.     #   write_lambda: "return x * 2.0;"
  2797.     #   step: 1
  2798.     #   mode: box
  2799.     #   entity_category: config
  2800.  
  2801.     # - platform: modbus_controller
  2802.     #   modbus_controller_id: sprsun_pc
  2803.     #   name: ${friendly_name} A17 MV heat initial 3
  2804.     #   address: 0x0042
  2805.     #   skip_updates: 10      
  2806.     #   #unit_of_measurement: "S"
  2807.     #   id: a17_mv_heat_initial_3
  2808.     #   value_type: U_WORD
  2809.     #   min_value: 0
  2810.     #   max_value: 240
  2811.     #   lambda: "return x / 2.0;"
  2812.     #   write_lambda: "return x * 2.0;"
  2813.     #   step: 1
  2814.     #   mode: box
  2815.     #   entity_category: config
  2816.  
  2817.     # - platform: modbus_controller
  2818.     #   modbus_controller_id: sprsun_pc
  2819.     #   name: ${friendly_name} A18 MV heat initial 4
  2820.     #   address: 0x0043
  2821.     #   skip_updates: 10      
  2822.     #   #unit_of_measurement: "S"
  2823.     #   id: a18_mv_heat_initial_4
  2824.     #   value_type: U_WORD
  2825.     #   min_value: 0
  2826.     #   max_value: 240
  2827.     #   lambda: "return x / 2.0;"
  2828.     #   write_lambda: "return x * 2.0;"
  2829.     #   step: 1
  2830.     #   mode: box
  2831.     #   entity_category: config
  2832.  
  2833.     # - platform: modbus_controller
  2834.     #   modbus_controller_id: sprsun_pc
  2835.     #   name: ${friendly_name} A19 MV heat initial 5
  2836.     #   address: 0x0044
  2837.     #   skip_updates: 10      
  2838.     #   #unit_of_measurement: "S"
  2839.     #   id: a19_mv_heat_initial_5
  2840.     #   value_type: U_WORD
  2841.     #   min_value: 0
  2842.     #   max_value: 240
  2843.     #   lambda: "return x / 2.0;"
  2844.     #   write_lambda: "return x * 2.0;"
  2845.     #   step: 1
  2846.     #   mode: box
  2847.     #   entity_category: config
  2848.  
  2849.     # - platform: modbus_controller
  2850.     #   modbus_controller_id: sprsun_pc
  2851.     #   name: ${friendly_name} A20 MV heat initial 6
  2852.     #   address: 0x0045
  2853.     #   skip_updates: 10      
  2854.     #   #unit_of_measurement: "S"
  2855.     #   id: a20_mv_heat_initial_6
  2856.     #   value_type: U_WORD
  2857.     #   min_value: 0
  2858.     #   max_value: 240
  2859.     #   lambda: "return x / 2.0;"
  2860.     #   write_lambda: "return x * 2.0;"
  2861.     #   step: 1
  2862.     #   mode: box
  2863.     #   entity_category: config
  2864.  
  2865.     # - platform: modbus_controller
  2866.     #   modbus_controller_id: sprsun_pc
  2867.     #   name: ${friendly_name} A21 MV heat initial 7
  2868.     #   address: 0x0046
  2869.     #   skip_updates: 10    
  2870.     #   #unit_of_measurement: "S"
  2871.     #   id: a21_mv_heat_initial_7
  2872.     #   value_type: U_WORD
  2873.     #   min_value: 0
  2874.     #   max_value: 240
  2875.     #   lambda: "return x / 2.0;"
  2876.     #   write_lambda: "return x * 2.0;"
  2877.     #   step: 1
  2878.     #   mode: box
  2879.     #   entity_category: config
  2880.  
  2881.     # - platform: modbus_controller
  2882.     #   modbus_controller_id: sprsun_pc
  2883.     #   name: ${friendly_name} A22 MV cool initial 0
  2884.     #   address: 0x0047
  2885.     #   skip_updates: 10      
  2886.     #   #unit_of_measurement: "S"
  2887.     #   id: a22_mv_cool_initial_0
  2888.     #   value_type: U_WORD
  2889.     #   min_value: 0
  2890.     #   max_value: 240
  2891.     #   lambda: "return x / 2.0;"
  2892.     #   write_lambda: "return x * 2.0;"
  2893.     #   step: 1
  2894.     #   mode: box
  2895.     #   entity_category: config
  2896.  
  2897.     # - platform: modbus_controller
  2898.     #   modbus_controller_id: sprsun_pc
  2899.     #   name: ${friendly_name} A23 MV cool initial 1
  2900.     #   address: 0x0048
  2901.     #   skip_updates: 10    
  2902.     #   #unit_of_measurement: "S"
  2903.     #   id: a23_mv_cool_initial_1
  2904.     #   value_type: U_WORD
  2905.     #   min_value: 0
  2906.     #   max_value: 240
  2907.     #   lambda: "return x / 2.0;"
  2908.     #   write_lambda: "return x * 2.0;"
  2909.     #   step: 1
  2910.     #   mode: box
  2911.     #   entity_category: config
  2912.  
  2913.     # - platform: modbus_controller
  2914.     #   modbus_controller_id: sprsun_pc
  2915.     #   name: ${friendly_name} A24 MV cool initial 2
  2916.     #   address: 0x0049
  2917.     #   skip_updates: 10
  2918.     #  #unit_of_measurement: "S"
  2919.     #   id: a24_mv_cool_initial_2
  2920.     #   value_type: U_WORD
  2921.     #   min_value: 0
  2922.     #   max_value: 240
  2923.     #   lambda: "return x / 2.0;"
  2924.     #   write_lambda: "return x * 2.0;"
  2925.     #   step: 1
  2926.     #   mode: box
  2927.     #   entity_category: config
  2928.  
  2929.     # - platform: modbus_controller
  2930.     #   modbus_controller_id: sprsun_pc
  2931.     #   name: ${friendly_name} A25 MV cool initial 3
  2932.     #   address: 0x004A
  2933.     #   skip_updates: 10      
  2934.     #   #unit_of_measurement: "S"
  2935.     #   id: a25_mv_cool_initial_3
  2936.     #   value_type: U_WORD
  2937.     #   min_value: 0
  2938.     #   max_value: 240
  2939.     #   lambda: "return x / 2.0;"
  2940.     #   write_lambda: "return x * 2.0;"
  2941.     #   step: 1
  2942.     #   mode: box
  2943.     #   entity_category: config
  2944.  
  2945.     # - platform: modbus_controller
  2946.     #   modbus_controller_id: sprsun_pc
  2947.     #   name: ${friendly_name} A26 MV water initial 0
  2948.     #   address: 0x004B
  2949.     #   skip_updates: 10      
  2950.     #   #unit_of_measurement: "S"
  2951.     #   id: a26_mv_water_initial_0
  2952.     #   value_type: U_WORD
  2953.     #   min_value: 0
  2954.     #   max_value: 240
  2955.     #   lambda: "return x / 2.0;"
  2956.     #   write_lambda: "return x * 2.0;"
  2957.     #   step: 1
  2958.     #   mode: box
  2959.     #   entity_category: config
  2960.  
  2961.     # - platform: modbus_controller
  2962.     #   modbus_controller_id: sprsun_pc
  2963.     #   name: ${friendly_name} A27 MV water initial 1
  2964.     #   address: 0x004C
  2965.     #   skip_updates: 10      
  2966.     #   #unit_of_measurement: "S"
  2967.     #   id: a27_mv_water_initial_1
  2968.     #   value_type: U_WORD
  2969.     #   min_value: 0
  2970.     #   max_value: 240
  2971.     #   lambda: "return x / 2.0;"
  2972.     #   write_lambda: "return x * 2.0;"
  2973.     #   step: 1
  2974.     #   mode: box
  2975.     #   entity_category: config
  2976.  
  2977.     # - platform: modbus_controller
  2978.     #   modbus_controller_id: sprsun_pc
  2979.     #   name: ${friendly_name} A28 MV water initial 2
  2980.     #   address: 0x004D
  2981.     #   skip_updates: 10      
  2982.     #   #unit_of_measurement: "S"
  2983.     #   id: a28_mv_water_initial_2
  2984.     #   value_type: U_WORD
  2985.     #   min_value: 0
  2986.     #   max_value: 240
  2987.     #   lambda: "return x / 2.0;"
  2988.     #   write_lambda: "return x * 2.0;"
  2989.     #   step: 1
  2990.     #   mode: box
  2991.     #   entity_category: config
  2992.  
  2993.     # - platform: modbus_controller
  2994.     #   modbus_controller_id: sprsun_pc
  2995.     #   name: ${friendly_name} A29 MV water initial 3
  2996.     #   address: 0x004E
  2997.     #   skip_updates: 10      
  2998.     #   #unit_of_measurement: "S"
  2999.     #   id: a29_mv_water_initial_3
  3000.     #   value_type: U_WORD
  3001.     #   min_value: 0
  3002.     #   max_value: 240
  3003.     #   lambda: "return x / 2.0;"
  3004.     #   write_lambda: "return x * 2.0;"
  3005.     #   step: 1
  3006.     #   mode: box
  3007.     #   entity_category: config
  3008.  
  3009.     # - platform: modbus_controller
  3010.     #   modbus_controller_id: sprsun_pc
  3011.     #   name: ${friendly_name} A30 MV water initial 4
  3012.     #   address: 0x004F
  3013.     #   skip_updates: 10      
  3014.     #   #unit_of_measurement: "S"
  3015.     #   id: a30_mv_water_initial_4
  3016.     #   value_type: U_WORD
  3017.     #   min_value: 0
  3018.     #   max_value: 240
  3019.     #   lambda: "return x / 2.0;"
  3020.     #   write_lambda: "return x * 2.0;"
  3021.     #   step: 1
  3022.     #   mode: box
  3023.     #   entity_category: config
  3024.  
  3025.     # - platform: modbus_controller
  3026.     #   modbus_controller_id: sprsun_pc
  3027.     #   name: ${friendly_name} A31 MV water initial 5
  3028.     #   address: 0x0050
  3029.     #   skip_updates: 10      
  3030.     #   #unit_of_measurement: "S"
  3031.     #   id: a31_mv_water_initial_5
  3032.     #   value_type: U_WORD
  3033.     #   min_value: 0
  3034.     #   max_value: 240
  3035.     #   lambda: "return x / 2.0;"
  3036.     #   write_lambda: "return x * 2.0;"
  3037.     #   step: 1
  3038.     #   mode: box
  3039.     #   entity_category: config
  3040.  
  3041.     # - platform: modbus_controller
  3042.     #   modbus_controller_id: sprsun_pc
  3043.     #   name: ${friendly_name} A32 MV water initial 6
  3044.     #   address: 0x0051
  3045.     #   skip_updates: 10      
  3046.     #   #unit_of_measurement: "S"
  3047.     #   id: a32_mv_water_initial_6
  3048.     #   value_type: U_WORD
  3049.     #   min_value: 0
  3050.     #   max_value: 240
  3051.     #   lambda: "return x / 2.0;"
  3052.     #   write_lambda: "return x * 2.0;"
  3053.     #   step: 1
  3054.     #   mode: box
  3055.     #   entity_category: config
  3056.  
  3057.     # - platform: modbus_controller
  3058.     #   modbus_controller_id: sprsun_pc
  3059.     #   name: ${friendly_name} A33 MV water initial 7
  3060.     #   address: 0x0052
  3061.     #   skip_updates: 10      
  3062.     #   #unit_of_measurement: "S"
  3063.     #   id: a33_mv_water_initial_7
  3064.     #   value_type: U_WORD
  3065.     #   min_value: 0
  3066.     #   max_value: 240
  3067.     #   lambda: "return x / 2.0;"
  3068.     #   write_lambda: "return x * 2.0;"
  3069.     #   step: 1
  3070.     #   mode: box
  3071.     #   entity_category: config
  3072.  
  3073.     # - platform: modbus_controller
  3074.     #   modbus_controller_id: sprsun_pc
  3075.     #   name: ${friendly_name} A34 MV heat lower 0
  3076.     #   address: 0x0053
  3077.     #   skip_updates: 10      
  3078.     #   #unit_of_measurement: "S"
  3079.     #   id: a34_mv_heat_lower_0
  3080.     #   value_type: U_WORD
  3081.     #   min_value: 0
  3082.     #   max_value: 240
  3083.     #   lambda: "return x / 2.0;"
  3084.     #   write_lambda: "return x * 2.0;"
  3085.     #   step: 1
  3086.     #   mode: box
  3087.     #   entity_category: config
  3088.  
  3089.     # - platform: modbus_controller
  3090.     #   modbus_controller_id: sprsun_pc
  3091.     #   name: ${friendly_name} A35 MV heat lower 1
  3092.     #   address: 0x0054
  3093.     #   skip_updates: 10      
  3094.     #   #unit_of_measurement: "S"
  3095.     #   id: a35_mv_heat_lower_1
  3096.     #   value_type: U_WORD
  3097.     #   min_value: 0
  3098.     #   max_value: 240
  3099.     #   lambda: "return x / 2.0;"
  3100.     #   write_lambda: "return x * 2.0;"
  3101.     #   step: 1
  3102.     #   mode: box
  3103.     #   entity_category: config
  3104.  
  3105.     # - platform: modbus_controller
  3106.     #   modbus_controller_id: sprsun_pc
  3107.     #   name: ${friendly_name} A34 MV heat lower 2
  3108.     #   address: 0x0055
  3109.     #   skip_updates: 10      
  3110.     #   #unit_of_measurement: "S"
  3111.     #   id: a34_mv_heat_lower_2
  3112.     #   value_type: U_WORD
  3113.     #   min_value: 0
  3114.     #   max_value: 240
  3115.     #   lambda: "return x / 2.0;"
  3116.     #   write_lambda: "return x * 2.0;"
  3117.     #   step: 1
  3118.     #   mode: box
  3119.     #   entity_category: config
  3120.  
  3121.     # - platform: modbus_controller
  3122.     #   modbus_controller_id: sprsun_pc
  3123.     #   name: ${friendly_name} A34 MV heat lower 3
  3124.     #   address: 0x0056
  3125.     #   skip_updates: 10      
  3126.     #   #unit_of_measurement: "S"
  3127.     #   id: a34_mv_heat_lower_3
  3128.     #   value_type: U_WORD
  3129.     #   min_value: 0
  3130.     #   max_value: 240
  3131.     #   lambda: "return x / 2.0;"
  3132.     #   write_lambda: "return x * 2.0;"
  3133.     #   step: 1
  3134.     #   mode: box
  3135.     #   entity_category: config
  3136.  
  3137.     # - platform: modbus_controller
  3138.     #   modbus_controller_id: sprsun_pc
  3139.     #   name: ${friendly_name} A34 MV heat lower 4
  3140.     #   address: 0x0057
  3141.     #   skip_updates: 10      
  3142.     #   #unit_of_measurement: "S"
  3143.     #   id: a34_mv_heat_lower_4
  3144.     #   value_type: U_WORD
  3145.     #   min_value: 0
  3146.     #   max_value: 240
  3147.     #   lambda: "return x / 2.0;"
  3148.     #   write_lambda: "return x * 2.0;"
  3149.     #   step: 1
  3150.     #   mode: box
  3151.     #   entity_category: config
  3152.  
  3153.     # - platform: modbus_controller
  3154.     #   modbus_controller_id: sprsun_pc
  3155.     #   name: ${friendly_name} A34 MV heat lower 5
  3156.     #   address: 0x0058
  3157.     #   skip_updates: 10    
  3158.     #   #unit_of_measurement: "S"
  3159.     #   id: a34_mv_heat_lower_5
  3160.     #   value_type: U_WORD
  3161.     #   min_value: 0
  3162.     #   max_value: 240
  3163.     #   lambda: "return x / 2.0;"
  3164.     #   write_lambda: "return x * 2.0;"
  3165.     #   step: 1
  3166.     #   mode: box
  3167.     #   entity_category: config
  3168.  
  3169.     # - platform: modbus_controller
  3170.     #   modbus_controller_id: sprsun_pc
  3171.     #   name: ${friendly_name} A34 MV heat lower 6
  3172.     #   address: 0x0059
  3173.     #   skip_updates: 10
  3174.     #   #unit_of_measurement: "S"
  3175.     #   id: a34_mv_heat_lower_6
  3176.     #   value_type: U_WORD
  3177.     #   min_value: 0
  3178.     #   max_value: 240
  3179.     #   lambda: "return x / 2.0;"
  3180.     #   write_lambda: "return x * 2.0;"
  3181.     #   step: 1
  3182.     #   mode: box
  3183.     #   entity_category: config
  3184.  
  3185.     # - platform: modbus_controller
  3186.     #   modbus_controller_id: sprsun_pc
  3187.     #   name: ${friendly_name} A34 MV heat lower 7
  3188.     #   address: 0x005A
  3189.     #   skip_updates: 10      
  3190.     #   #unit_of_measurement: "S"
  3191.     #   id: a34_mv_heat_lower_7
  3192.     #   value_type: U_WORD
  3193.     #   min_value: 0
  3194.     #   max_value: 240
  3195.     #   lambda: "return x / 2.0;"
  3196.     #   write_lambda: "return x * 2.0;"
  3197.     #   step: 1
  3198.     #   mode: box
  3199.     #   entity_category: config
  3200.  
  3201.     # - platform: modbus_controller
  3202.     #   modbus_controller_id: sprsun_pc
  3203.     #   name: ${friendly_name} A43 MV defrost open
  3204.     #   address: 0x005B
  3205.     #   skip_updates: 10      
  3206.     #   #unit_of_measurement: "S"
  3207.     #   id: a43_mv_defrost_open
  3208.     #   value_type: U_WORD
  3209.     #   min_value: 0
  3210.     #   max_value: 240
  3211.     #   lambda: "return x / 2.0;"
  3212.     #   write_lambda: "return x * 2.0;"
  3213.     #   step: 1
  3214.     #   mode: box
  3215.     #   entity_category: config
  3216.  
  3217.     # - platform: modbus_controller
  3218.     #   modbus_controller_id: sprsun_pc
  3219.     #   name: ${friendly_name} A44 MV water lower
  3220.     #   address: 0x005C
  3221.     #   skip_updates: 10      
  3222.     #   #unit_of_measurement: "S"
  3223.     #   id: a44_mv_water_lower
  3224.     #   value_type: U_WORD
  3225.     #   min_value: 25
  3226.     #   max_value: 75
  3227.     #   lambda: "return x / 2.0;"
  3228.     #   write_lambda: "return x * 2.0;"
  3229.     #   step: 1
  3230.     #   mode: box
  3231.     #   entity_category: config
  3232.  
  3233.     # - platform: modbus_controller
  3234.     #   modbus_controller_id: sprsun_pc
  3235.     #   name: ${friendly_name} A46 MV manual open
  3236.     #   address: 0x005D
  3237.     #   skip_updates: 10      
  3238.     #   #unit_of_measurement: "S"
  3239.     #   id: a46_mv_manual_open
  3240.     #   value_type: U_WORD
  3241.     #   min_value: 10
  3242.     #   max_value: 225
  3243.     #   lambda: "return x / 2.0;"
  3244.     #   write_lambda: "return x * 2.0;"
  3245.     #   step: 1
  3246.     #   mode: box
  3247.     #   entity_category: config
  3248.  
  3249.     # - platform: modbus_controller
  3250.     #   modbus_controller_id: sprsun_pc
  3251.     #   name: ${friendly_name} A47 MV SH ratio
  3252.     #   address: 0x005E
  3253.     #   skip_updates: 10      
  3254.     #   #unit_of_measurement: "S"
  3255.     #   id: a47_mv_sh_ratio
  3256.     #   value_type: U_WORD
  3257.     #   min_value: 1
  3258.     #   max_value: 6
  3259.     #   #lambda: "return x / 2.0;"
  3260.     #   #write_lambda: "return x * 2.0;"
  3261.     #   step: 1
  3262.     #   mode: box
  3263.     #   entity_category: config
  3264.  
  3265.     # - platform: modbus_controller
  3266.     #   modbus_controller_id: sprsun_pc
  3267.     #   name: ${friendly_name} A48 MV SH diff.
  3268.     #   address: 0x005F
  3269.     #   skip_updates: 10      
  3270.     #   #unit_of_measurement: "S"
  3271.     #   id: a48_mv_sh_diff
  3272.     #   value_type: U_WORD
  3273.     #   min_value: 1
  3274.     #   max_value: 180
  3275.     #   #lambda: "return x / 2.0;"
  3276.     #   #write_lambda: "return x * 2.0;"
  3277.     #   step: 1
  3278.     #   mode: box
  3279.     #   entity_category: config
  3280.  
  3281.     # - platform: modbus_controller
  3282.     #   modbus_controller_id: sprsun_pc
  3283.     #   name: ${friendly_name} A50 MV comp keep time
  3284.     #   address: 0x0060
  3285.     #   skip_updates: 10      
  3286.     #   unit_of_measurement: "S"
  3287.     #   id: a50_mv_comp_keep_time
  3288.     #   value_type: U_WORD
  3289.     #   min_value: 0
  3290.     #   max_value: 250
  3291.     #   lambda: "return x / 2.0;"
  3292.     #   write_lambda: "return x * 2.0;"
  3293.     #   step: 1
  3294.     #   mode: box
  3295.     #   entity_category: config
  3296.  
  3297.     # - platform: modbus_controller
  3298.     #   modbus_controller_id: sprsun_pc
  3299.     #   name: ${friendly_name} A51 MV defrost keep time
  3300.     #   address: 0x0061
  3301.     #   skip_updates: 10      
  3302.     #   unit_of_measurement: "S"
  3303.     #   id: a51_mv_defrost_keep_time
  3304.     #   value_type: U_WORD
  3305.     #   min_value: 0
  3306.     #   max_value: 250
  3307.     #   lambda: "return x / 2.0;"
  3308.     #   write_lambda: "return x * 2.0;"
  3309.     #   step: 1
  3310.     #   mode: box
  3311.     #   entity_category: config
  3312.  
  3313.     # - platform: modbus_controller
  3314.     #   modbus_controller_id: sprsun_pc
  3315.     #   name: ${friendly_name} B02 AV manual open
  3316.     #   address: 0x0062
  3317.     #   skip_updates: 10      
  3318.     #   #unit_of_measurement: "S"
  3319.     #   id: b02_av_manual_open
  3320.     #   value_type: U_WORD
  3321.     #   min_value: 10
  3322.     #   max_value: 225
  3323.     #   lambda: "return x / 2.0;"
  3324.     #   write_lambda: "return x * 2.0;"
  3325.     #   step: 1
  3326.     #   mode: box
  3327.     #   entity_category: config
  3328.  
  3329.     # - platform: modbus_controller
  3330.     #   modbus_controller_id: sprsun_pc
  3331.     #   name: ${friendly_name} B04 AV exhaust ratio
  3332.     #   address: 0x0063
  3333.     #   skip_updates: 10      
  3334.     #   #unit_of_measurement: "S"
  3335.     #   id: b04_av_exhaust_ratio
  3336.     #   value_type: U_WORD
  3337.     #   min_value: 1
  3338.     #   max_value: 6
  3339.     #   #lambda: "return x / 2.0;"
  3340.     #   #write_lambda: "return x * 2.0;"
  3341.     #   step: 1
  3342.     #   mode: box
  3343.     #   entity_category: config
  3344.  
  3345.     # - platform: modbus_controller
  3346.     #   modbus_controller_id: sprsun_pc
  3347.     #   skip_updates: 10      
  3348.     #   name: ${friendly_name} B05 AV exhaust diff
  3349.     #   address: 0x0064
  3350.     #   #unit_of_measurement: "S"
  3351.     #   id: b05_av_exhaust_diff
  3352.     #   value_type: U_WORD
  3353.     #   min_value: 0
  3354.     #   max_value: 180
  3355.     #   #lambda: "return x / 2.0;"
  3356.     #   #write_lambda: "return x * 2.0;"
  3357.     #   step: 1
  3358.     #   mode: box
  3359.     #   entity_category: config
  3360.  
  3361.     # - platform: modbus_controller
  3362.     #   modbus_controller_id: sprsun_pc
  3363.     #   name: ${friendly_name} B06 AV SH ratio
  3364.     #   address: 0x0065
  3365.     #   skip_updates: 10      
  3366.     #   #unit_of_measurement: "S"
  3367.     #   id: b06_av_sh_ratio
  3368.     #   value_type: U_WORD
  3369.     #   min_value: 1
  3370.     #   max_value: 6
  3371.     #   #lambda: "return x / 2.0;"
  3372.     #   #write_lambda: "return x * 2.0;"
  3373.     #   step: 1
  3374.     #   mode: box
  3375.     #   entity_category: config
  3376.  
  3377.     # - platform: modbus_controller
  3378.     #   modbus_controller_id: sprsun_pc
  3379.     #   name: ${friendly_name} B07 AV SH diff
  3380.     #   address: 0x0066
  3381.     #   skip_updates: 10      
  3382.     #   #unit_of_measurement: "S"
  3383.     #   id: b07_av_sh_diff
  3384.     #   value_type: U_WORD
  3385.     #   min_value: 0
  3386.     #   max_value: 180
  3387.     #   #lambda: "return x / 2.0;"
  3388.     #   #write_lambda: "return x * 2.0;"
  3389.     #   step: 1
  3390.     #   mode: box
  3391.     #   entity_category: config
  3392.  
  3393.     # - platform: modbus_controller
  3394.     #   modbus_controller_id: sprsun_pc
  3395.     #   name: ${friendly_name} B08 AV period
  3396.     #   address: 0x0067
  3397.     #   skip_updates: 10      
  3398.     #   unit_of_measurement: "S"
  3399.     #   id: b08_av_period
  3400.     #   value_type: U_WORD
  3401.     #   min_value: 10
  3402.     #   max_value: 20
  3403.     #   #lambda: "return x / 2.0;"
  3404.     #   #write_lambda: "return x * 2.0;"
  3405.     #   step: 1
  3406.     #   mode: box
  3407.     #   entity_category: config
  3408.  
  3409.     # - platform: modbus_controller
  3410.     #   modbus_controller_id: sprsun_pc
  3411.     #   name: ${friendly_name} B19 AV heat initial 0 (Outlet temp <= B93)
  3412.     #   address: 0x0068
  3413.     #   skip_updates: 10      
  3414.     #   #unit_of_measurement: "S"
  3415.     #   id: b19_av_heat_initial_0
  3416.     #   value_type: U_WORD
  3417.     #   min_value: 0
  3418.     #   max_value: 240
  3419.     #   lambda: "return x / 2.0;"
  3420.     #   write_lambda: "return x * 2.0;"
  3421.     #   step: 1
  3422.     #   mode: box
  3423.     #   entity_category: config
  3424.  
  3425.     # - platform: modbus_controller
  3426.     #   modbus_controller_id: sprsun_pc
  3427.     #   name: ${friendly_name} B20 AV heat initial 1
  3428.     #   address: 0x0069
  3429.     #   skip_updates: 10      
  3430.     #   #unit_of_measurement: "S"
  3431.     #   id: b20_av_heat_initial_1
  3432.     #   value_type: U_WORD
  3433.     #   min_value: 0
  3434.     #   max_value: 240
  3435.     #   lambda: "return x / 2.0;"
  3436.     #   write_lambda: "return x * 2.0;"
  3437.     #   step: 1
  3438.     #   mode: box
  3439.     #   entity_category: config
  3440.  
  3441.     # - platform: modbus_controller
  3442.     #   modbus_controller_id: sprsun_pc
  3443.     #   name: ${friendly_name} B27 AV water initial 0 (Outlet temp<=B93)
  3444.     #   address: 0x0070
  3445.     #   skip_updates: 10      
  3446.     #   #unit_of_measurement: "S"
  3447.     #   id: b27_av_water_initial_0
  3448.     #   value_type: U_WORD
  3449.     #   min_value: 0
  3450.     #   max_value: 240
  3451.     #   lambda: "return x / 2.0;"
  3452.     #   write_lambda: "return x * 2.0;"
  3453.     #   step: 1
  3454.     #   mode: box
  3455.     #   entity_category: config
  3456.  
  3457.     # - platform: modbus_controller
  3458.     #   modbus_controller_id: sprsun_pc
  3459.     #   name: ${friendly_name} B28 AV water initial 1
  3460.     #   address: 0x0071
  3461.     #   skip_updates: 10      
  3462.     #   #unit_of_measurement: "S"
  3463.     #   id: b28_water_initial_1
  3464.     #   value_type: U_WORD
  3465.     #   min_value: 0
  3466.     #   max_value: 240
  3467.     #   lambda: "return x / 2.0;"
  3468.     #   write_lambda: "return x * 2.0;"
  3469.     #   step: 1
  3470.     #   mode: box
  3471.     #   entity_category: config
  3472.  
  3473.     # - platform: modbus_controller
  3474.     #   modbus_controller_id: sprsun_pc
  3475.     #   name: ${friendly_name} B35 AV heat lower 0
  3476.     #   address: 0x0078
  3477.     #   skip_updates: 10      
  3478.     #   #unit_of_measurement: "S"
  3479.     #   id: b35_av_heat_lower_0
  3480.     #   value_type: U_WORD
  3481.     #   min_value: 0
  3482.     #   max_value: 240
  3483.     #   lambda: "return x / 2.0;"
  3484.     #   write_lambda: "return x * 2.0;"
  3485.     #   step: 1
  3486.     #   mode: box
  3487.     #   entity_category: config
  3488.  
  3489.     # - platform: modbus_controller
  3490.     #   modbus_controller_id: sprsun_pc
  3491.     #   name: ${friendly_name} B36 AV heat lower 1
  3492.     #   address: 0x0079
  3493.     #   skip_updates: 10      
  3494.     #   #unit_of_measurement: "S"
  3495.     #   id: b36_av_heat_lower_1
  3496.     #   value_type: U_WORD
  3497.     #   min_value: 0
  3498.     #   max_value: 240
  3499.     #   lambda: "return x / 2.0;"
  3500.     #   write_lambda: "return x * 2.0;"
  3501.     #   step: 1
  3502.     #   mode: box
  3503.     #   entity_category: config
  3504.  
  3505.     # - platform: modbus_controller
  3506.     #   modbus_controller_id: sprsun_pc
  3507.     #   name: ${friendly_name} B37 AV heat lower 2
  3508.     #   address: 0x007A
  3509.     #   skip_updates: 10      
  3510.     #   #unit_of_measurement: "S"
  3511.     #   id: b37_av_heat_lower_2
  3512.     #   value_type: U_WORD
  3513.     #   min_value: 0
  3514.     #   max_value: 240
  3515.     #   lambda: "return x / 2.0;"
  3516.     #   write_lambda: "return x * 2.0;"
  3517.     #   step: 1
  3518.     #   mode: box
  3519.     #   entity_category: config
  3520.  
  3521.     # - platform: modbus_controller
  3522.     #   modbus_controller_id: sprsun_pc
  3523.     #   name: ${friendly_name} B38 AV heat lower 3
  3524.     #   address: 0x007B
  3525.     #   skip_updates: 10      
  3526.     #   #unit_of_measurement: "S"
  3527.     #   id: b38_av_heat_lower_3
  3528.     #   value_type: U_WORD
  3529.     #   min_value: 0
  3530.     #   max_value: 240
  3531.     #   lambda: "return x / 2.0;"
  3532.     #   write_lambda: "return x * 2.0;"
  3533.     #   step: 1
  3534.     #   mode: box
  3535.     #   entity_category: config
  3536.  
  3537.     # - platform: modbus_controller
  3538.     #   modbus_controller_id: sprsun_pc
  3539.     #   name: ${friendly_name} B39 AV heat lower 4
  3540.     #   address: 0x007C
  3541.     #   skip_updates: 10      
  3542.     #   #unit_of_measurement: "S"
  3543.     #   id: b39_av_heat_lower_4
  3544.     #   value_type: U_WORD
  3545.     #   min_value: 0
  3546.     #   max_value: 240
  3547.     #   lambda: "return x / 2.0;"
  3548.     #   write_lambda: "return x * 2.0;"
  3549.     #   step: 1
  3550.     #   mode: box
  3551.     #   entity_category: config
  3552.  
  3553.     # - platform: modbus_controller
  3554.     #   modbus_controller_id: sprsun_pc
  3555.     #   name: ${friendly_name} B40 AV heat lower 5
  3556.     #   address: 0x007D
  3557.     #   skip_updates: 10      
  3558.     #   #unit_of_measurement: "S"
  3559.     #   id: b40_av_heat_lower_5
  3560.     #   value_type: U_WORD
  3561.     #   min_value: 0
  3562.     #   max_value: 240
  3563.     #   lambda: "return x / 2.0;"
  3564.     #   write_lambda: "return x * 2.0;"
  3565.     #   step: 1
  3566.     #   mode: box
  3567.     #   entity_category: config
  3568.  
  3569.     # - platform: modbus_controller
  3570.     #   modbus_controller_id: sprsun_pc
  3571.     #   name: ${friendly_name} B41 AV heat lower 6
  3572.     #   address: 0x007E
  3573.     #   skip_updates: 10      
  3574.     #   #unit_of_measurement: "S"
  3575.     #   id: b41_av_heat_lower_6
  3576.     #   value_type: U_WORD
  3577.     #   min_value: 0
  3578.     #   max_value: 240
  3579.     #   lambda: "return x / 2.0;"
  3580.     #   write_lambda: "return x * 2.0;"
  3581.     #   step: 1
  3582.     #   mode: box
  3583.     #   entity_category: config
  3584.  
  3585.     # - platform: modbus_controller
  3586.     #   modbus_controller_id: sprsun_pc
  3587.     #   name: ${friendly_name} B42 AV heat lower 7
  3588.     #   address: 0x007F
  3589.     #   skip_updates: 10      
  3590.     #   #unit_of_measurement: "S"
  3591.     #   id: b42_av_heat_lower_7
  3592.     #   value_type: U_WORD
  3593.     #   min_value: 0
  3594.     #   max_value: 240
  3595.     #   lambda: "return x / 2.0;"
  3596.     #   write_lambda: "return x * 2.0;"
  3597.     #   step: 1
  3598.     #   mode: box
  3599.     #   entity_category: config
  3600.  
  3601.     # - platform: modbus_controller
  3602.     #   modbus_controller_id: sprsun_pc
  3603.     #   name: ${friendly_name} B43 AV defrost open
  3604.     #   address: 0x0080
  3605.     #   skip_updates: 10      
  3606.     #   #unit_of_measurement: "S"
  3607.     #   id: b43_av_defrost_open
  3608.     #   value_type: U_WORD
  3609.     #   min_value: 0
  3610.     #   max_value: 240
  3611.     #   lambda: "return x / 2.0;"
  3612.     #   write_lambda: "return x * 2.0;"
  3613.     #   step: 1
  3614.     #   mode: box
  3615.     #   entity_category: config
  3616.  
  3617.     # - platform: modbus_controller
  3618.     #   modbus_controller_id: sprsun_pc
  3619.     #   name: ${friendly_name} B44 AV cool open
  3620.     #   address: 0x0081
  3621.     #   skip_updates: 10      
  3622.     #   #unit_of_measurement: "S"
  3623.     #   id: b44_av_cool_open
  3624.     #   value_type: U_WORD
  3625.     #   min_value: 0
  3626.     #   max_value: 240
  3627.     #   lambda: "return x / 2.0;"
  3628.     #   write_lambda: "return x * 2.0;"
  3629.     #   step: 1
  3630.     #   mode: box
  3631.     #   entity_category: config
  3632.  
  3633.     # - platform: modbus_controller
  3634.     #   modbus_controller_id: sprsun_pc
  3635.     #   name: ${friendly_name} F02 HP protect value
  3636.     #   address: 0x0082
  3637.     #   skip_updates: 10      
  3638.     #   unit_of_measurement: "bar"
  3639.     #   id: f02_hp_protect_value
  3640.     #   value_type: U_WORD
  3641.     #   min_value: 0
  3642.     #   max_value: 250
  3643.     #   lambda: "return (x + 250) * 0.1;"
  3644.     #   write_lambda: "return (x - 250) / 0.1;"
  3645.     #   step: 1
  3646.     #   mode: box
  3647.     #   entity_category: config
  3648.  
  3649.     # - platform: modbus_controller
  3650.     #   modbus_controller_id: sprsun_pc
  3651.     #   name: ${friendly_name} F03 HP recover value
  3652.     #   address: 0x0083
  3653.     #   skip_updates: 10      
  3654.     #   unit_of_measurement: "bar"
  3655.     #   id: f03_hp_recover_value
  3656.     #   value_type: U_WORD
  3657.     #   min_value: 0
  3658.     #   max_value: 250
  3659.     #   lambda: "return (x + 250) * 0.1;"
  3660.     #   write_lambda: "return (x - 250) / 0.1;"
  3661.     #   step: 1
  3662.     #   mode: box
  3663.     #   entity_category: config
  3664.  
  3665.     # - platform: modbus_controller
  3666.     #   modbus_controller_id: sprsun_pc
  3667.     #   name: ${friendly_name} F04 LP protect value
  3668.     #   address: 0x0084
  3669.     #   skip_updates: 10      
  3670.     #   unit_of_measurement: "bar"
  3671.     #   id: f04_lp_protect_value
  3672.     #   value_type: U_WORD
  3673.     #   min_value: 0
  3674.     #   max_value: 200
  3675.     #   lambda: "return x * 0.1;"
  3676.     #   write_lambda: "return x / 0.1;"
  3677.     #   step: 1
  3678.     #   mode: box
  3679.     #   entity_category: config
  3680.  
  3681.     # - platform: modbus_controller
  3682.     #   modbus_controller_id: sprsun_pc
  3683.     #   name: ${friendly_name} F05 LP recover value
  3684.     #   address: 0x0085
  3685.     #   skip_updates: 10      
  3686.     #   unit_of_measurement: "bar"
  3687.     #   id: f05_lp_recover_value
  3688.     #   value_type: U_WORD
  3689.     #   min_value: 0
  3690.     #   max_value: 200
  3691.     #   lambda: "return x * 0.1;"
  3692.     #   write_lambda: "return x / 0.1;"
  3693.     #   step: 1
  3694.     #   mode: box
  3695.     #   entity_category: config
  3696.  
  3697.     # - platform: modbus_controller
  3698.     #   modbus_controller_id: sprsun_pc
  3699.     #   name: ${friendly_name} D03 Cool dcfan max speed
  3700.     #   address: 0x0086
  3701.     #   skip_updates: 10      
  3702.     #   unit_of_measurement: "RPM"
  3703.     #   icon: "mdi:fan-speed-1"
  3704.     #   id: d03_cool_dcfan_max_speed
  3705.     #   value_type: U_WORD
  3706.     #   min_value: 0
  3707.     #   max_value: 100
  3708.     #   lambda: "return x / 10.0;"
  3709.     #   write_lambda: "return x * 10.0;"
  3710.     #   step: 1
  3711.     #   mode: box
  3712.     #   entity_category: config
  3713.  
  3714.     # - platform: modbus_controller
  3715.     #   modbus_controller_id: sprsun_pc
  3716.     #   name: ${friendly_name} D04 Cool dcfan min speed
  3717.     #   address: 0x0087
  3718.     #   skip_updates: 10      
  3719.     #   unit_of_measurement: "RPM"
  3720.     #   icon: "mdi:fan-speed-1"
  3721.     #   id: d04_cool_dcfan_min_speed
  3722.     #   value_type: U_WORD
  3723.     #   min_value: 0
  3724.     #   max_value: 100
  3725.     #   lambda: "return x / 10.0;"
  3726.     #   write_lambda: "return x * 10.0;"
  3727.     #   step: 1
  3728.     #   mode: box
  3729.     #   entity_category: config
  3730.  
  3731.     # - platform: modbus_controller
  3732.     #   modbus_controller_id: sprsun_pc
  3733.     #   name: ${friendly_name} D05 Cool dcfan high press
  3734.     #   address: 0x0088
  3735.     #   skip_updates: 10      
  3736.     #   #Sunit_of_measurement: "bar"
  3737.     #   icon: "mdi:fan-speed-1"
  3738.     #   id: d05_cool_dcfan_high_press
  3739.     #   value_type: U_WORD
  3740.     #   min_value: 10
  3741.     #   max_value: 40
  3742.     #   #lambda: "return x / 10.0;"
  3743.     #   #write_lambda: "return x * 10.0;"
  3744.     #   step: 1
  3745.     #   mode: box
  3746.     #   entity_category: config
  3747.  
  3748.     # - platform: modbus_controller
  3749.     #   modbus_controller_id: sprsun_pc
  3750.     #   name: ${friendly_name} D06 Cool dcfan open diff
  3751.     #   address: 0x0089
  3752.     #   skip_updates: 10      
  3753.     #   unit_of_measurement: "bar"
  3754.     #   icon: "mdi:fan-speed-1"
  3755.     #   id: d06_cool_dcfan_open_diff
  3756.     #   value_type: U_WORD
  3757.     #   min_value: 2
  3758.     #   max_value: 10
  3759.     #   lambda: "return x / 10.0;"
  3760.     #   write_lambda: "return x * 10.0;"
  3761.     #   step: 1
  3762.     #   mode: box
  3763.     #   entity_category: config
  3764.  
  3765.     # - platform: modbus_controller
  3766.     #   modbus_controller_id: sprsun_pc
  3767.     #   name: ${friendly_name} D07 Cool dcfan close diff
  3768.     #   address: 0x008A
  3769.     #   skip_updates: 10      
  3770.     #   unit_of_measurement: "bar"
  3771.     #   icon: "mdi:fan-speed-1"
  3772.     #   id: d07_cool_dcfan_close_diff
  3773.     #   value_type: U_WORD
  3774.     #   min_value: 2
  3775.     #   max_value: 10
  3776.     #   lambda: "return x / 10.0;"
  3777.     #   write_lambda: "return x * 10.0;"
  3778.     #   step: 1
  3779.     #   mode: box
  3780.     #   entity_category: config
  3781.  
  3782.     # - platform: modbus_controller
  3783.     #   modbus_controller_id: sprsun_pc
  3784.     #   name: ${friendly_name} D08 Cool dcfan init speed
  3785.     #   address: 0x008B
  3786.     #   skip_updates: 10      
  3787.     #   unit_of_measurement: "RPM"
  3788.     #   icon: "mdi:fan-speed-1"
  3789.     #   id: d08_cool_dcfan_init_speed
  3790.     #   value_type: U_WORD
  3791.     #   min_value: 0
  3792.     #   max_value: 100
  3793.     #   lambda: "return x / 10.0;"
  3794.     #   write_lambda: "return x * 10.0;"
  3795.     #   step: 1
  3796.     #   mode: box
  3797.     #   entity_category: config
  3798.  
  3799.     # - platform: modbus_controller
  3800.     #   modbus_controller_id: sprsun_pc
  3801.     #   name: ${friendly_name} D09 Heat dcfan max speed
  3802.     #   address: 0x008C
  3803.     #   skip_updates: 10      
  3804.     #   unit_of_measurement: "RPM"
  3805.     #   icon: "mdi:fan-speed-1"
  3806.     #   id: d09_heat_dcfan_max_speed
  3807.     #   value_type: U_WORD
  3808.     #   min_value: 0
  3809.     #   max_value: 100
  3810.     #   lambda: "return x / 10.0;"
  3811.     #   write_lambda: "return x * 10.0;"
  3812.     #   step: 1
  3813.     #   mode: box
  3814.     #   entity_category: config
  3815.  
  3816.     # - platform: modbus_controller
  3817.     #   modbus_controller_id: sprsun_pc
  3818.     #   name: ${friendly_name} D10 Heat dcfan min speed
  3819.     #   address: 0x008D
  3820.     #   skip_updates: 10      
  3821.     #   unit_of_measurement: "RPM"
  3822.     #   icon: "mdi:fan-speed-1"
  3823.     #   id: d10_heat_dcfan_min_speed
  3824.     #   value_type: U_WORD
  3825.     #   min_value: 0
  3826.     #   max_value: 100
  3827.     #   lambda: "return x / 10.0;"
  3828.     #   write_lambda: "return x * 10.0;"
  3829.     #   step: 1
  3830.     #   mode: box
  3831.     #   entity_category: config
  3832.  
  3833.     # - platform: modbus_controller
  3834.     #   modbus_controller_id: sprsun_pc
  3835.     #   name: ${friendly_name} D11 Heat dcfan low press
  3836.     #   address: 0x008E
  3837.     #   skip_updates: 10      
  3838.     #   unit_of_measurement: "bar"
  3839.     #   icon: "mdi:fan-speed-1"
  3840.     #   id: d11_heat_dcfan_low_press
  3841.     #   value_type: U_WORD
  3842.     #   min_value: 5
  3843.     #   max_value: 15
  3844.     #   lambda: "return x / 10.0;"
  3845.     #   write_lambda: "return x * 10.0;"
  3846.     #   step: 1
  3847.     #   mode: box
  3848.     #   entity_category: config
  3849.  
  3850.     # - platform: modbus_controller
  3851.     #   modbus_controller_id: sprsun_pc
  3852.     #   name: ${friendly_name} D12 Heat dcfan open diff
  3853.     #   address: 0x008F
  3854.     #   skip_updates: 10      
  3855.     #   unit_of_measurement: "bar"
  3856.     #   icon: "mdi:fan-speed-1"
  3857.     #   id: d12_heat_dcfan_open_diff
  3858.     #   value_type: U_WORD
  3859.     #   min_value: 2
  3860.     #   max_value: 10
  3861.     #   lambda: "return x / 10.0;"
  3862.     #   write_lambda: "return x * 10.0;"
  3863.     #   step: 1
  3864.     #   mode: box
  3865.     #   entity_category: config
  3866.  
  3867.     # - platform: modbus_controller
  3868.     #   modbus_controller_id: sprsun_pc
  3869.     #   name: ${friendly_name} D13 Heat dcfan close diff
  3870.     #   address: 0x0090
  3871.     #   skip_updates: 10      
  3872.     #   unit_of_measurement: "bar"
  3873.     #   icon: "mdi:fan-speed-1"
  3874.     #   id: d13_heat_dcfan_close_diff
  3875.     #   value_type: U_WORD
  3876.     #   min_value: 2
  3877.     #   max_value: 10
  3878.     #   lambda: "return x / 10.0;"
  3879.     #   write_lambda: "return x * 10.0;"
  3880.     #   step: 1
  3881.     #   mode: box
  3882.  
  3883.     # - platform: modbus_controller
  3884.     #   modbus_controller_id: sprsun_pc
  3885.     #   name: ${friendly_name} D14 Heat dcfan init speed
  3886.     #   address: 0x0091
  3887.     #   skip_updates: 10      
  3888.     #   unit_of_measurement: "RPM"
  3889.     #   icon: "mdi:fan-speed-1"
  3890.     #   id: d14_heat_dcfan_init_speed
  3891.     #   value_type: U_WORD
  3892.     #   min_value: 0
  3893.     #   max_value: 100
  3894.     #   lambda: "return x / 10.0;"
  3895.     #   write_lambda: "return x * 10.0;"
  3896.     #   step: 1
  3897.     #   mode: box
  3898.  
  3899.     # - platform: modbus_controller
  3900.     #   modbus_controller_id: sprsun_pc
  3901.     #   name: ${friendly_name} D15 DCfan adjust period
  3902.     #   address: 0x0092
  3903.     #   skip_updates: 10      
  3904.     #   unit_of_measurement: "RPM"
  3905.     #   icon: "mdi:fan-speed-1"
  3906.     #   id: d15_dcfan_adjust_period
  3907.     #   value_type: U_WORD
  3908.     #   min_value: 0
  3909.     #   max_value: 30
  3910.     #   #lambda: "return x / 10.0;"
  3911.     #   #write_lambda: "return x * 10.0;"
  3912.     #   step: 1
  3913.     #   mode: box
  3914.     #   entity_category: config
  3915.  
  3916.     # - platform: modbus_controller
  3917.     #   modbus_controller_id: sprsun_pc
  3918.     #   name: ${friendly_name} D16 DCfan adjust speed 1 (Speed difference >=200)
  3919.     #   address: 0x0093
  3920.     #   skip_updates: 10      
  3921.     #   unit_of_measurement: "RPM"
  3922.     #   icon: "mdi:fan-speed-1"
  3923.     #   id: d16_dcfun_adjust_speed_1
  3924.     #   value_type: U_WORD
  3925.     #   min_value: 0
  3926.     #   max_value: 100
  3927.     #   #lambda: "return x / 10.0;"
  3928.     #   #write_lambda: "return x * 10.0;"
  3929.     #   step: 1
  3930.     #   mode: box
  3931.     #   entity_category: config
  3932.  
  3933.     # - platform: modbus_controller
  3934.     #   modbus_controller_id: sprsun_pc
  3935.     #   name: ${friendly_name} D17 DCfan adjust speed 2 (200>Speed difference>100)
  3936.     #   address: 0x0094
  3937.     #   skip_updates: 10      
  3938.     #   unit_of_measurement: "RPM"
  3939.     #   icon: "mdi:fan-speed-1"
  3940.     #   id: d17_dcfun_adjust_speed_2
  3941.     #   value_type: U_WORD
  3942.     #   min_value: 0
  3943.     #   max_value: 100
  3944.     #   #lambda: "return x / 10.0;"
  3945.     #   #write_lambda: "return x * 10.0;"
  3946.     #   step: 1
  3947.     #   mode: box
  3948.     #   entity_category: config
  3949.  
  3950.     # - platform: modbus_controller
  3951.     #   modbus_controller_id: sprsun_pc
  3952.     #   name: ${friendly_name} D18 DCfan adjust speed 3 (100>Speed difference>50)
  3953.     #   address: 0x0095
  3954.     #   skip_updates: 10      
  3955.     #   unit_of_measurement: "RPM"
  3956.     #   icon: "mdi:fan-speed-1"
  3957.     #   id: d18_dcfun_adjust_speed_3
  3958.     #   value_type: U_WORD
  3959.     #   min_value: 0
  3960.     #   max_value: 100
  3961.     #   #lambda: "return x / 10.0;"
  3962.     #   #write_lambda: "return x * 10.0;"
  3963.     #   step: 1
  3964.     #   mode: box
  3965.     #   entity_category: config
  3966.  
  3967.     # - platform: modbus_controller
  3968.     #   modbus_controller_id: sprsun_pc
  3969.     #   name: ${friendly_name} D19 DCfan adjust speed 4 (50>Speed difference>20)
  3970.     #   address: 0x0096
  3971.     #   skip_updates: 10      
  3972.     #   unit_of_measurement: "RPM"
  3973.     #   icon: "mdi:fan-speed-1"
  3974.     #   id: d19_dcfun_adjust_speed_4
  3975.     #   value_type: U_WORD
  3976.     #   min_value: 0
  3977.     #   max_value: 100
  3978.     #   #lambda: "return x / 10.0;"
  3979.     #   #write_lambda: "return x * 10.0;"
  3980.     #   step: 1
  3981.     #   mode: box
  3982.     #   entity_category: config
  3983.  
  3984.     # - platform: modbus_controller
  3985.     #   modbus_controller_id: sprsun_pc
  3986.     #   name: ${friendly_name} D20 DCfan adjust speed 5 (20>Speed difference>5)
  3987.     #   address: 0x0097
  3988.     #   skip_updates: 10      
  3989.     #   unit_of_measurement: "RPM"
  3990.     #   icon: "mdi:fan-speed-1"
  3991.     #   id: d20_dcfun_adjust_speed_5
  3992.     #   value_type: U_WORD
  3993.     #   min_value: 0
  3994.     #   max_value: 100
  3995.     #   #lambda: "return x / 10.0;"
  3996.     #   #write_lambda: "return x * 10.0;"
  3997.     #   step: 1
  3998.     #   mode: box
  3999.     #   entity_category: config
  4000.  
  4001.     # - platform: modbus_controller
  4002.     #   modbus_controller_id: sprsun_pc
  4003.     #   name: ${friendly_name} B45 AV water lower 0
  4004.     #   address: 0x0098
  4005.     #   skip_updates: 10      
  4006.     #   #unit_of_measurement: "RPM"
  4007.     #   #icon: "mdi:fan-speed-1"
  4008.     #   id: b45_av_water_lower_0
  4009.     #   value_type: U_WORD
  4010.     #   min_value: 0
  4011.     #   max_value: 240
  4012.     #   lambda: "return x / 2.0;"
  4013.     #   write_lambda: "return x * 2.0;"
  4014.     #   step: 1
  4015.     #   mode: box
  4016.     #   entity_category: config
  4017.  
  4018.     # - platform: modbus_controller
  4019.     #   modbus_controller_id: sprsun_pc
  4020.     #   name: ${friendly_name} B46 AV water lower 1
  4021.     #   address: 0x0099
  4022.     #   skip_updates: 10      
  4023.     #   #unit_of_measurement: "RPM"
  4024.     #   #icon: "mdi:fan-speed-1"
  4025.     #   id: b46_av_water_lower_1
  4026.     #   value_type: U_WORD
  4027.     #   min_value: 0
  4028.     #   max_value: 240
  4029.     #   lambda: "return x / 2.0;"
  4030.     #   write_lambda: "return x * 2.0;"
  4031.     #   step: 1
  4032.     #   mode: box
  4033.     #   entity_category: config
  4034.  
  4035.     # - platform: modbus_controller
  4036.     #   modbus_controller_id: sprsun_pc
  4037.     #   name: ${friendly_name} B47 AV water lower 2
  4038.     #   address: 0x009A
  4039.     #   skip_updates: 10      
  4040.     #   #unit_of_measurement: "RPM"
  4041.     #   #icon: "mdi:fan-speed-1"
  4042.     #   id: b47_av_water_lower_2
  4043.     #   value_type: U_WORD
  4044.     #   min_value: 0
  4045.     #   max_value: 240
  4046.     #   lambda: "return x / 2.0;"
  4047.     #   write_lambda: "return x * 2.0;"
  4048.     #   step: 1
  4049.     #   mode: box
  4050.     #   entity_category: config
  4051.    
  4052.     # - platform: modbus_controller
  4053.     #   modbus_controller_id: sprsun_pc
  4054.     #   name: ${friendly_name} B48 AV water lower 3
  4055.     #   address: 0x009B
  4056.     #   skip_updates: 10      
  4057.     #   #unit_of_measurement: "RPM"
  4058.     #   #icon: "mdi:fan-speed-1"
  4059.     #   id: b48_av_water_lower_3
  4060.     #   value_type: U_WORD
  4061.     #   min_value: 0
  4062.     #   max_value: 240
  4063.     #   lambda: "return x / 2.0;"
  4064.     #   write_lambda: "return x * 2.0;"
  4065.     #   step: 1
  4066.     #   mode: box
  4067.     #   entity_category: config
  4068.  
  4069.     # - platform: modbus_controller
  4070.     #   modbus_controller_id: sprsun_pc
  4071.     #   name: ${friendly_name} B49 AV water lower 4
  4072.     #   address: 0x009C
  4073.     #   skip_updates: 10      
  4074.     #   #unit_of_measurement: "RPM"
  4075.     #   #icon: "mdi:fan-speed-1"
  4076.     #   id: b49_av_water_lower_4
  4077.     #   value_type: U_WORD
  4078.     #   min_value: 0
  4079.     #   max_value: 240
  4080.     #   lambda: "return x / 2.0;"
  4081.     #   write_lambda: "return x * 2.0;"
  4082.     #   step: 1
  4083.     #   mode: box
  4084.     #   entity_category: config
  4085.  
  4086.     # - platform: modbus_controller
  4087.     #   modbus_controller_id: sprsun_pc
  4088.     #   name: ${friendly_name} B50 AV water lower 5
  4089.     #   address: 0x009D
  4090.     #   skip_updates: 10      
  4091.     #   #unit_of_measurement: "RPM"
  4092.     #   #icon: "mdi:fan-speed-1"
  4093.     #   id: b50_av_water_lower_5
  4094.     #   value_type: U_WORD
  4095.     #   min_value: 0
  4096.     #   max_value: 240
  4097.     #   lambda: "return x / 2.0;"
  4098.     #   write_lambda: "return x * 2.0;"
  4099.     #   step: 1
  4100.     #   mode: box
  4101.     #   entity_category: config
  4102.  
  4103.     # - platform: modbus_controller
  4104.     #   modbus_controller_id: sprsun_pc
  4105.     #   name: ${friendly_name} B51 AV water lower 6
  4106.     #   address: 0x009E
  4107.     #   skip_updates: 10      
  4108.     #   #unit_of_measurement: "RPM"
  4109.     #   #icon: "mdi:fan-speed-1"
  4110.     #   id: b51_av_water_lower_6
  4111.     #   value_type: U_WORD
  4112.     #   min_value: 0
  4113.     #   max_value: 240
  4114.     #   lambda: "return x / 2.0;"
  4115.     #   write_lambda: "return x * 2.0;"
  4116.     #   step: 1
  4117.     #   mode: box
  4118.     #   entity_category: config
  4119.  
  4120.     # - platform: modbus_controller
  4121.     #   modbus_controller_id: sprsun_pc
  4122.     #   name: ${friendly_name} B52 AV water lower 7
  4123.     #   address: 0x009F
  4124.     #   skip_updates: 10      
  4125.     #   #unit_of_measurement: "RPM"
  4126.     #   #icon: "mdi:fan-speed-1"
  4127.     #   id: b52_av_water_lower_7
  4128.     #   value_type: U_WORD
  4129.     #   min_value: 0
  4130.     #   max_value: 240
  4131.     #   lambda: "return x / 2.0;"
  4132.     #   write_lambda: "return x * 2.0;"
  4133.     #   step: 1
  4134.     #   mode: box
  4135.     #   entity_category: config
  4136.  
  4137.  
  4138.     # - platform: modbus_controller
  4139.     #   modbus_controller_id: sprsun_pc
  4140.     #   name: ${friendly_name} B53 AV heat exhaust 0 (T >= 14 *C)
  4141.     #   address: 0x00A0
  4142.     #   skip_updates: 10      
  4143.     #   unit_of_measurement: "°C"
  4144.     #   #icon: "mdi:fan-speed-1"
  4145.     #   id: b53_av_heat_exhaust_0
  4146.     #   value_type: U_WORD
  4147.     #   min_value: 50
  4148.     #   max_value: 125
  4149.     #   #lambda: "return x / 10.0;"
  4150.     #   #write_lambda: "return x * 10.0;"
  4151.     #   step: 1
  4152.     #   mode: box
  4153.     #   entity_category: config
  4154.  
  4155.     # - platform: modbus_controller
  4156.     #   modbus_controller_id: sprsun_pc
  4157.     #   name: ${friendly_name} B54 AV heat exhaust 1 [9, 14 *C)
  4158.     #   address: 0x00A1
  4159.     #   skip_updates: 10      
  4160.     #   unit_of_measurement: "°C"
  4161.     #   #icon: "mdi:fan-speed-1"
  4162.     #   id: b54_av_heat_exhaust_1
  4163.     #   value_type: U_WORD
  4164.     #   min_value: 50
  4165.     #   max_value: 125
  4166.     #   #lambda: "return x / 10.0;"
  4167.     #   #write_lambda: "return x * 10.0;"
  4168.     #   step: 1
  4169.     #   mode: box
  4170.     #   entity_category: config
  4171.  
  4172.     # - platform: modbus_controller
  4173.     #   modbus_controller_id: sprsun_pc
  4174.     #   name: ${friendly_name} B55 AV heat exhaust 2 [4, 9 *C)
  4175.     #   address: 0x00A2
  4176.     #   skip_updates: 10      
  4177.     #   unit_of_measurement: "°C"
  4178.     #   #icon: "mdi:fan-speed-1"
  4179.     #   id: b55_av_heat_exhaust_2
  4180.     #   value_type: U_WORD
  4181.     #   min_value: 50
  4182.     #   max_value: 125
  4183.     #   #lambda: "return x / 10.0;"
  4184.     #   #write_lambda: "return x * 10.0;"
  4185.     #   step: 1
  4186.     #   mode: box
  4187.     #   entity_category: config
  4188.  
  4189.     # - platform: modbus_controller
  4190.     #   modbus_controller_id: sprsun_pc
  4191.     #   name: ${friendly_name} B56 AV heat exhaust 3 [-5, 4 *C)
  4192.     #   address: 0x00A3
  4193.     #   skip_updates: 10      
  4194.     #   unit_of_measurement: "°C"
  4195.     #   #icon: "mdi:fan-speed-1"
  4196.     #   id: b56_av_heat_exhaust_3
  4197.     #   value_type: U_WORD
  4198.     #   min_value: 50
  4199.     #   max_value: 125
  4200.     #   #lambda: "return x / 10.0;"
  4201.     #   #write_lambda: "return x * 10.0;"
  4202.     #   step: 1
  4203.     #   mode: box
  4204.     #   entity_category: config
  4205.  
  4206.     # - platform: modbus_controller
  4207.     #   modbus_controller_id: sprsun_pc
  4208.     #   name: ${friendly_name} B57 AV heat exhaust 4 [-10, -5 *C)
  4209.     #   address: 0x00A4
  4210.     #   skip_updates: 10      
  4211.     #   unit_of_measurement: "°C"
  4212.     #   #icon: "mdi:fan-speed-1"
  4213.     #   id: b57_av_heat_exhaust_4
  4214.     #   value_type: U_WORD
  4215.     #   min_value: 50
  4216.     #   max_value: 125
  4217.     #   #lambda: "return x / 10.0;"
  4218.     #   #write_lambda: "return x * 10.0;"
  4219.     #   step: 1
  4220.     #   mode: box
  4221.     #   entity_category: config
  4222.  
  4223.     # - platform: modbus_controller
  4224.     #   modbus_controller_id: sprsun_pc
  4225.     #   name: ${friendly_name} B58 AV heat exhaust 5 [-16, -10 *C)
  4226.     #   address: 0x00A5
  4227.     #   skip_updates: 10      
  4228.     #   unit_of_measurement: "°C"
  4229.     #   #icon: "mdi:fan-speed-1"
  4230.     #   id: b58_av_heat_exhaust_5
  4231.     #   value_type: U_WORD
  4232.     #   min_value: 50
  4233.     #   max_value: 125
  4234.     #   #lambda: "return x / 10.0;"
  4235.     #   #write_lambda: "return x * 10.0;"
  4236.     #   step: 1
  4237.     #   mode: box
  4238.     #   entity_category: config
  4239.  
  4240.     # - platform: modbus_controller
  4241.     #   modbus_controller_id: sprsun_pc
  4242.     #   name: ${friendly_name} B59 AV heat exhaust 6 [-23, -16 *C)
  4243.     #   address: 0x00A6
  4244.     #   skip_updates: 10      
  4245.     #   unit_of_measurement: "°C"
  4246.     #   #icon: "mdi:fan-speed-1"
  4247.     #   id: b59_av_heat_exhaust_6
  4248.     #   value_type: U_WORD
  4249.     #   min_value: 50
  4250.     #   max_value: 125
  4251.     #   #lambda: "return x / 10.0;"
  4252.     #   #write_lambda: "return x * 10.0;"
  4253.     #   step: 1
  4254.     #   mode: box
  4255.     #   entity_category: config
  4256.  
  4257.     # - platform: modbus_controller
  4258.     #   modbus_controller_id: sprsun_pc
  4259.     #   name: ${friendly_name} B60 AV heat exhaust 7 (T < -23 *C)
  4260.     #   address: 0x00A7
  4261.     #   skip_updates: 10      
  4262.     #   unit_of_measurement: "°C"
  4263.     #   #icon: "mdi:fan-speed-1"
  4264.     #   id: b60_av_heat_exhaust_7
  4265.     #   value_type: U_WORD
  4266.     #   min_value: 50
  4267.     #   max_value: 125
  4268.     #   #lambda: "return x / 10.0;"
  4269.     #   #write_lambda: "return x * 10.0;"
  4270.     #   step: 1
  4271.     #   mode: box
  4272.     #   entity_category: config
  4273.  
  4274.     # - platform: modbus_controller
  4275.     #   modbus_controller_id: sprsun_pc
  4276.     #   name: ${friendly_name} B61 AV water exhaust 0 (T >= 14 *C)
  4277.     #   address: 0x00A8
  4278.     #   skip_updates: 10      
  4279.     #   unit_of_measurement: "°C"
  4280.     #   #icon: "mdi:fan-speed-1"
  4281.     #   id: b61_av_water_exhaust_0
  4282.     #   value_type: U_WORD
  4283.     #   min_value: 50
  4284.     #   max_value: 125
  4285.     #   #lambda: "return x / 10.0;"
  4286.     #   #write_lambda: "return x * 10.0;"
  4287.     #   step: 1
  4288.     #   mode: box
  4289.     #   entity_category: config
  4290.  
  4291.     # - platform: modbus_controller
  4292.     #   modbus_controller_id: sprsun_pc
  4293.     #   name: ${friendly_name} B62 AV water exhaust 1 [9, 14 *C)
  4294.     #   address: 0x00A9
  4295.     #   skip_updates: 10      
  4296.     #   unit_of_measurement: "°C"
  4297.     #   #icon: "mdi:fan-speed-1"
  4298.     #   id: b62_av_water_exhaust_1
  4299.     #   value_type: U_WORD
  4300.     #   min_value: 50
  4301.     #   max_value: 125
  4302.     #   #lambda: "return x / 10.0;"
  4303.     #   #write_lambda: "return x * 10.0;"
  4304.     #   step: 1
  4305.     #   mode: box
  4306.     #   entity_category: config
  4307.  
  4308.     # - platform: modbus_controller
  4309.     #   modbus_controller_id: sprsun_pc
  4310.     #   name: ${friendly_name} B63 AV water exhaust 2 [4, 9 *C)
  4311.     #   address: 0x00AA
  4312.     #   skip_updates: 10      
  4313.     #   unit_of_measurement: "°C"
  4314.     #   #icon: "mdi:fan-speed-1"
  4315.     #   id: b62_av_water_exhaust_2
  4316.     #   value_type: U_WORD
  4317.     #   min_value: 50
  4318.     #   max_value: 125
  4319.     #   #lambda: "return x / 10.0;"
  4320.     #   #write_lambda: "return x * 10.0;"
  4321.     #   step: 1
  4322.     #   mode: box
  4323.     #   entity_category: config
  4324.  
  4325.     # - platform: modbus_controller
  4326.     #   modbus_controller_id: sprsun_pc
  4327.     #   name: ${friendly_name} B64 AV water exhaust 3 [-5, 4 *C)
  4328.     #   address: 0x00AB
  4329.     #   skip_updates: 10      
  4330.     #   unit_of_measurement: "°C"
  4331.     #   #icon: "mdi:fan-speed-1"
  4332.     #   id: b64_av_water_exhaust_3
  4333.     #   value_type: U_WORD
  4334.     #   min_value: 50
  4335.     #   max_value: 125
  4336.     #   #lambda: "return x / 10.0;"
  4337.     #   #write_lambda: "return x * 10.0;"
  4338.     #   step: 1
  4339.     #   mode: box
  4340.     #   entity_category: config
  4341.  
  4342.     # - platform: modbus_controller
  4343.     #   modbus_controller_id: sprsun_pc
  4344.     #   name: ${friendly_name} B65 AV water exhaust 4 [-10, -5 *C)
  4345.     #   address: 0x00AC
  4346.     #   skip_updates: 10      
  4347.     #   unit_of_measurement: "°C"
  4348.     #   #icon: "mdi:fan-speed-1"
  4349.     #   id: b65_av_water_exhaust_4
  4350.     #   value_type: U_WORD
  4351.     #   min_value: 50
  4352.     #   max_value: 125
  4353.     #   #lambda: "return x / 10.0;"
  4354.     #   #write_lambda: "return x * 10.0;"
  4355.     #   step: 1
  4356.     #   mode: box
  4357.     #   entity_category: config
  4358.  
  4359.     # - platform: modbus_controller
  4360.     #   modbus_controller_id: sprsun_pc
  4361.     #   name: ${friendly_name} B66 AV water exhaust 5 [-16, -10 *C)
  4362.     #   address: 0x00AD
  4363.     #   skip_updates: 10      
  4364.     #   unit_of_measurement: "°C"
  4365.     #   #icon: "mdi:fan-speed-1"
  4366.     #   id: b66_av_water_exhaust_5
  4367.     #   value_type: U_WORD
  4368.     #   min_value: 50
  4369.     #   max_value: 125
  4370.     #   #lambda: "return x / 10.0;"
  4371.     #   #write_lambda: "return x * 10.0;"
  4372.     #   step: 1
  4373.     #   mode: box
  4374.     #   entity_category: config
  4375.  
  4376.     # - platform: modbus_controller
  4377.     #   modbus_controller_id: sprsun_pc
  4378.     #   name: ${friendly_name} B67 AV water exhaust 6 [-23, -16 *C)
  4379.     #   address: 0x00AE  
  4380.     #   unit_of_measurement: "°C"
  4381.     #   #icon: "mdi:fan-speed-1"
  4382.     #   id: b67_av_water_exhaust_6
  4383.     #   value_type: U_WORD
  4384.     #   min_value: 50
  4385.     #   max_value: 125
  4386.     #   #lambda: "return x / 10.0;"
  4387.     #   #write_lambda: "return x * 10.0;"
  4388.     #   step: 1
  4389.     #   mode: box
  4390.     #   entity_category: config
  4391.     #   skip_updates: 10
  4392.  
  4393.     # - platform: modbus_controller
  4394.     #   modbus_controller_id: sprsun_pc
  4395.     #   name: ${friendly_name} B68 AV water exhaust 7 (T < -23 *C)
  4396.     #   address: 0x00AF
  4397.     #   unit_of_measurement: "°C"
  4398.     #   #icon: "mdi:fan-speed-1"
  4399.     #   id: b68_av_water_exhaust_7
  4400.     #   value_type: U_WORD
  4401.     #   min_value: 50
  4402.     #   max_value: 125
  4403.     #   #lambda: "return x / 10.0;"
  4404.     #   #write_lambda: "return x * 10.0;"
  4405.     #   step: 1
  4406.     #   mode: box
  4407.     #   entity_category: config
  4408.     #   skip_updates: 10
  4409.  
  4410.     # - platform: modbus_controller
  4411.     #   modbus_controller_id: sprsun_pc
  4412.     #   name: ${friendly_name} B69 AV cool exhaust 0 (T >= 38 *C)
  4413.     #   address: 0x00B0
  4414.     #   unit_of_measurement: "°C"
  4415.     #   #icon: "mdi:fan-speed-1"
  4416.     #   id: b69_av_cool_exhaust_0
  4417.     #   value_type: U_WORD
  4418.     #   min_value: 50
  4419.     #   max_value: 125
  4420.     #   #lambda: "return x / 10.0;"
  4421.     #   #write_lambda: "return x * 10.0;"
  4422.     #   step: 1
  4423.     #   mode: box
  4424.     #   entity_category: config
  4425.     #   skip_updates: 10
  4426.  
  4427.     # - platform: modbus_controller
  4428.     #   modbus_controller_id: sprsun_pc
  4429.     #   name: ${friendly_name} B70 AV cool exhaust 1 [30, 38 *C)
  4430.     #   address: 0x00B1
  4431.     #   unit_of_measurement: "°C"
  4432.     #   #icon: "mdi:fan-speed-1"
  4433.     #   id: b70_av_cool_exhaust_1
  4434.     #   value_type: U_WORD
  4435.     #   min_value: 50
  4436.     #   max_value: 125
  4437.     #   #lambda: "return x / 10.0;"
  4438.     #   #write_lambda: "return x * 10.0;"
  4439.     #   step: 1
  4440.     #   mode: box
  4441.     #   entity_category: config
  4442.     #   skip_updates: 10
  4443.  
  4444.     # - platform: modbus_controller
  4445.     #   modbus_controller_id: sprsun_pc
  4446.     #   name: ${friendly_name} B71 AV cool exhaust 2 [25, 30 *C)
  4447.     #   address: 0x00B2
  4448.     #   unit_of_measurement: "°C"
  4449.     #   #icon: "mdi:fan-speed-1"
  4450.     #   id: b71_av_cool_exhaust_2
  4451.     #   value_type: U_WORD
  4452.     #   min_value: 50
  4453.     #   max_value: 125
  4454.     #   #lambda: "return x / 10.0;"
  4455.     #   #write_lambda: "return x * 10.0;"
  4456.     #   step: 1
  4457.     #   mode: box
  4458.     #   entity_category: config
  4459.     #   skip_updates: 10
  4460.  
  4461.     # - platform: modbus_controller
  4462.     #   modbus_controller_id: sprsun_pc
  4463.     #   name: ${friendly_name} B72 AV cool exhaust 3 (T < 25 *C)
  4464.     #   address: 0x00B3
  4465.     #   unit_of_measurement: "°C"
  4466.     #   #icon: "mdi:fan-speed-1"
  4467.     #   id: b72_av_cool_exhaust_3
  4468.     #   value_type: U_WORD
  4469.     #   min_value: 50
  4470.     #   max_value: 125
  4471.     #   #lambda: "return x / 10.0;"
  4472.     #   #write_lambda: "return x * 10.0;"
  4473.     #   step: 1
  4474.     #   mode: box
  4475.     #   entity_category: config
  4476.     #   skip_updates: 10
  4477.  
  4478.     # - platform: modbus_controller
  4479.     #   modbus_controller_id: sprsun_pc
  4480.     #   name: ${friendly_name} B73 AV open delay
  4481.     #   address: 0x00B4
  4482.     #   unit_of_measurement: "S"
  4483.     #   #icon: "mdi:fan-speed-1"
  4484.     #   id: b74_av_open_delay
  4485.     #   value_type: U_WORD
  4486.     #   min_value: 0
  4487.     #   max_value: 180
  4488.     #   #lambda: "return x / 10.0;"
  4489.     #   #write_lambda: "return x * 10.0;"
  4490.     #   step: 1
  4491.     #   mode: box
  4492.     #   entity_category: config
  4493.     #   skip_updates: 10
  4494.  
  4495.     # - platform: modbus_controller
  4496.     #   modbus_controller_id: sprsun_pc
  4497.     #   name: ${friendly_name} B75 AV off exh diff
  4498.     #   address: 0x00B5
  4499.     #   #unit_of_measurement: "S"
  4500.     #   #icon: "mdi:fan-speed-1"
  4501.     #   id: b75_av_off_exh_diff
  4502.     #   value_type: U_WORD
  4503.     #   min_value: 0
  4504.     #   max_value: 30
  4505.     #   #lambda: "return x / 10.0;"
  4506.     #   #write_lambda: "return x * 10.0;"
  4507.     #   step: 1
  4508.     #   mode: box
  4509.     #   entity_category: config
  4510.     #   skip_updates: 10
  4511.  
  4512.     # - platform: modbus_controller
  4513.     #   modbus_controller_id: sprsun_pc
  4514.     #   name: ${friendly_name} B76 AV heat exh diff 0  (T >= 14 *C)
  4515.     #   address: 0x00B6
  4516.     #   unit_of_measurement: "°C"
  4517.     #   #icon: "mdi:fan-speed-1"
  4518.     #   id: b76_av_heat_exh_diff_0
  4519.     #   value_type: U_WORD
  4520.     #   min_value: 0
  4521.     #   max_value: 125
  4522.     #   #lambda: "return x / 10.0;"
  4523.     #   #write_lambda: "return x * 10.0;"
  4524.     #   step: 1
  4525.     #   mode: box
  4526.     #   entity_category: config
  4527.     #   skip_updates: 10
  4528.  
  4529.     # - platform: modbus_controller
  4530.     #   modbus_controller_id: sprsun_pc
  4531.     #   name: ${friendly_name} B77 AV heat exh diff 1 [9, 14 *C)
  4532.     #   address: 0x00B7
  4533.     #   unit_of_measurement: "°C"
  4534.     #   #icon: "mdi:fan-speed-1"
  4535.     #   id: b77_av_heat_exh_diff_1
  4536.     #   value_type: U_WORD
  4537.     #   min_value: 0
  4538.     #   max_value: 125
  4539.     #   #lambda: "return x / 10.0;"
  4540.     #   #write_lambda: "return x * 10.0;"
  4541.     #   step: 1
  4542.     #   mode: box
  4543.     #   entity_category: config
  4544.     #   skip_updates: 10
  4545.  
  4546.     # - platform: modbus_controller
  4547.     #   modbus_controller_id: sprsun_pc
  4548.     #   name: ${friendly_name} B78 AV heat exh diff 2 [4, 9 *C)
  4549.     #   address: 0x00B8
  4550.     #   unit_of_measurement: "°C"
  4551.     #   #icon: "mdi:fan-speed-1"
  4552.     #   id: b78_av_heat_exh_diff_2
  4553.     #   value_type: U_WORD
  4554.     #   min_value: 0
  4555.     #   max_value: 125
  4556.     #   #lambda: "return x / 10.0;"
  4557.     #   #write_lambda: "return x * 10.0;"
  4558.     #   step: 1
  4559.     #   mode: box
  4560.     #   entity_category: config
  4561.     #   skip_updates: 10
  4562.  
  4563.     # - platform: modbus_controller
  4564.     #   modbus_controller_id: sprsun_pc
  4565.     #   name: ${friendly_name} B79 AV heat exh diff 3 [-5, 4 *C)
  4566.     #   address: 0x00B9
  4567.     #   unit_of_measurement: "°C"
  4568.     #   #icon: "mdi:fan-speed-1"
  4569.     #   id: b79_av_heat_exh_diff_3
  4570.     #   value_type: U_WORD
  4571.     #   min_value: 0
  4572.     #   max_value: 125
  4573.     #   #lambda: "return x / 10.0;"
  4574.     #   #write_lambda: "return x * 10.0;"
  4575.     #   step: 1
  4576.     #   mode: box
  4577.     #   entity_category: config
  4578.     #   skip_updates: 10
  4579.  
  4580.     # - platform: modbus_controller
  4581.     #   modbus_controller_id: sprsun_pc
  4582.     #   name: ${friendly_name} B80 AV heat exh diff 4 [-10, -5 *C)
  4583.     #   address: 0x00BA
  4584.     #   unit_of_measurement: "°C"
  4585.     #   #icon: "mdi:fan-speed-1"
  4586.     #   id: b80_av_heat_exh_diff_4
  4587.     #   value_type: U_WORD
  4588.     #   min_value: 0
  4589.     #   max_value: 125
  4590.     #   #lambda: "return x / 10.0;"
  4591.     #   #write_lambda: "return x * 10.0;"
  4592.     #   step: 1
  4593.     #   mode: box
  4594.     #   entity_category: config
  4595.     #   skip_updates: 10
  4596.  
  4597.     # - platform: modbus_controller
  4598.     #   modbus_controller_id: sprsun_pc
  4599.     #   name: ${friendly_name} B81 AV heat exh diff 5 [-16, -10 *C)
  4600.     #   address: 0x00BB
  4601.     #   unit_of_measurement: "°C"
  4602.     #   #icon: "mdi:fan-speed-1"
  4603.     #   id: b81_av_heat_exh_diff_5
  4604.     #   value_type: U_WORD
  4605.     #   min_value: 0
  4606.     #   max_value: 125
  4607.     #   #lambda: "return x / 10.0;"
  4608.     #   #write_lambda: "return x * 10.0;"
  4609.     #   step: 1
  4610.     #   mode: box
  4611.     #   entity_category: config
  4612.     #   skip_updates: 10
  4613.  
  4614.     # - platform: modbus_controller
  4615.     #   modbus_controller_id: sprsun_pc
  4616.     #   name: ${friendly_name} B82 AV heat exh diff 6 [-23, -16 *C)
  4617.     #   address: 0x00BC
  4618.     #   unit_of_measurement: "°C"
  4619.     #   #icon: "mdi:fan-speed-1"
  4620.     #   id: b82_av_heat_exh_diff_6
  4621.     #   value_type: U_WORD
  4622.     #   min_value: 0
  4623.     #   max_value: 125
  4624.     #   #lambda: "return x / 10.0;"
  4625.     #   #write_lambda: "return x * 10.0;"
  4626.     #   step: 1
  4627.     #   mode: box
  4628.     #   entity_category: config
  4629.     #   skip_updates: 10
  4630.  
  4631.     # - platform: modbus_controller
  4632.     #   modbus_controller_id: sprsun_pc
  4633.     #   name: ${friendly_name} B83 AV heat exh diff 7 (T < -23 *C)
  4634.     #   address: 0x00BD
  4635.     #   unit_of_measurement: "°C"
  4636.     #   #icon: "mdi:fan-speed-1"
  4637.     #   id: b83_av_heat_exh_diff_7
  4638.     #   value_type: U_WORD
  4639.     #   min_value: 0
  4640.     #   max_value: 125
  4641.     #   #lambda: "return x / 10.0;"
  4642.     #   #write_lambda: "return x * 10.0;"
  4643.     #   step: 1
  4644.     #   mode: box
  4645.     #   entity_category: config
  4646.     #   skip_updates: 10
  4647.  
  4648.     # - platform: modbus_controller
  4649.     #   modbus_controller_id: sprsun_pc
  4650.     #   name: ${friendly_name} B84 AV water exh diff 0  (T >= 14 *C)
  4651.     #   address: 0x00BE
  4652.     #   unit_of_measurement: "°C"
  4653.     #   #icon: "mdi:fan-speed-1"
  4654.     #   id: b84_av_water_exh_diff_0
  4655.     #   value_type: U_WORD
  4656.     #   min_value: 0
  4657.     #   max_value: 125
  4658.     #   #lambda: "return x / 10.0;"
  4659.     #   #write_lambda: "return x * 10.0;"
  4660.     #   step: 1
  4661.     #   mode: box
  4662.     #   entity_category: config
  4663.     #   skip_updates: 10
  4664.  
  4665.     # - platform: modbus_controller
  4666.     #   modbus_controller_id: sprsun_pc
  4667.     #   name: ${friendly_name} B85 AV water exh diff 1 [9, 14 *C)
  4668.     #   address: 0x00BF
  4669.     #   unit_of_measurement: "°C"
  4670.     #   #icon: "mdi:fan-speed-1"
  4671.     #   id: b85_av_water_exh_diff_1
  4672.     #   value_type: U_WORD
  4673.     #   min_value: 0
  4674.     #   max_value: 125
  4675.     #   #lambda: "return x / 10.0;"
  4676.     #   #write_lambda: "return x * 10.0;"
  4677.     #   step: 1
  4678.     #   mode: box
  4679.     #   entity_category: config
  4680.     #   skip_updates: 10
  4681.  
  4682.     # - platform: modbus_controller
  4683.     #   modbus_controller_id: sprsun_pc
  4684.     #   name: ${friendly_name} B86 AV water exh diff 2 [4, 9 *C)
  4685.     #   address: 0x00C0
  4686.     #   unit_of_measurement: "°C"
  4687.     #   #icon: "mdi:fan-speed-1"
  4688.     #   id: b86_av_water_exh_diff_2
  4689.     #   value_type: U_WORD
  4690.     #   min_value: 0
  4691.     #   max_value: 125
  4692.     #   #lambda: "return x / 10.0;"
  4693.     #   #write_lambda: "return x * 10.0;"
  4694.     #   step: 1
  4695.     #   mode: box
  4696.     #   entity_category: config
  4697.     #   skip_updates: 10
  4698.  
  4699.     # - platform: modbus_controller
  4700.     #   modbus_controller_id: sprsun_pc
  4701.     #   name: ${friendly_name} B87 AV water exh diff 3 [-5, 4 *C)
  4702.     #   address: 0x00C1
  4703.     #   unit_of_measurement: "°C"
  4704.     #   #icon: "mdi:fan-speed-1"
  4705.     #   id: b87_av_water_exh_diff_3
  4706.     #   value_type: U_WORD
  4707.     #   min_value: 0
  4708.     #   max_value: 125
  4709.     #   #lambda: "return x / 10.0;"
  4710.     #   #write_lambda: "return x * 10.0;"
  4711.     #   step: 1
  4712.     #   mode: box
  4713.     #   entity_category: config
  4714.     #   skip_updates: 10
  4715.  
  4716.     # - platform: modbus_controller
  4717.     #   modbus_controller_id: sprsun_pc
  4718.     #   name: ${friendly_name} B88 AV water exh diff 4 [-10, -5 *C)
  4719.     #   address: 0x00C2
  4720.     #   unit_of_measurement: "°C"
  4721.     #   #icon: "mdi:fan-speed-1"
  4722.     #   id: b88_av_water_exh_diff_4
  4723.     #   value_type: U_WORD
  4724.     #   min_value: 0
  4725.     #   max_value: 125
  4726.     #   #lambda: "return x / 10.0;"
  4727.     #   #write_lambda: "return x * 10.0;"
  4728.     #   step: 1
  4729.     #   mode: box
  4730.     #   entity_category: config
  4731.     #   skip_updates: 10
  4732.  
  4733.     # - platform: modbus_controller
  4734.     #   modbus_controller_id: sprsun_pc
  4735.     #   name: ${friendly_name} B89 AV water exh diff 5 [-16, -10 *C)
  4736.     #   address: 0x00C3
  4737.     #   unit_of_measurement: "°C"
  4738.     #   #icon: "mdi:fan-speed-1"
  4739.     #   id: b89_av_water_exh_diff_5
  4740.     #   value_type: U_WORD
  4741.     #   min_value: 0
  4742.     #   max_value: 125
  4743.     #   #lambda: "return x / 10.0;"
  4744.     #   #write_lambda: "return x * 10.0;"
  4745.     #   step: 1
  4746.     #   mode: box
  4747.     #   entity_category: config
  4748.     #   skip_updates: 10
  4749.  
  4750.     # - platform: modbus_controller
  4751.     #   modbus_controller_id: sprsun_pc
  4752.     #   name: ${friendly_name} B90 AV water exh diff 6 [-23, -16 *C)
  4753.     #   address: 0x00C4
  4754.     #   unit_of_measurement: "°C"
  4755.     #   #icon: "mdi:fan-speed-1"
  4756.     #   id: b90_av_water_exh_diff_6
  4757.     #   value_type: U_WORD
  4758.     #   min_value: 0
  4759.     #   max_value: 125
  4760.     #   #lambda: "return x / 10.0;"
  4761.     #   #write_lambda: "return x * 10.0;"
  4762.     #   step: 1
  4763.     #   mode: box
  4764.     #   entity_category: config
  4765.     #   skip_updates: 10
  4766.  
  4767.     # - platform: modbus_controller
  4768.     #   modbus_controller_id: sprsun_pc
  4769.     #   name: ${friendly_name} B91 AV water exh diff 7 (T < -23 *C)
  4770.     #   address: 0x00C5
  4771.     #   unit_of_measurement: "°C"
  4772.     #   #icon: "mdi:fan-speed-1"
  4773.     #   id: b91_av_water_exh_diff_7
  4774.     #   value_type: U_WORD
  4775.     #   min_value: 0
  4776.     #   max_value: 125
  4777.     #   #lambda: "return x / 10.0;"
  4778.     #   #write_lambda: "return x * 10.0;"
  4779.     #   step: 1
  4780.     #   mode: box
  4781.     #   entity_category: config
  4782.     #   skip_updates: 10
  4783.  
  4784. #########################################################
  4785. ###   STOP DELTA TEMP GRZANIE: 4, DELTA TEMP GRZANIE (HISTEREZA): 5 (CZASAMI 6-7)
  4786.  
  4787.     - platform: modbus_controller
  4788.       modbus_controller_id: sprsun_pc
  4789.       name: ${friendly_name} P03 Histereza CO
  4790.       address: 0x00C6
  4791.       unit_of_measurement: "°C"
  4792.       #icon: "mdi:fan-speed-1"
  4793.       id: p03_temp_diff_co
  4794.       value_type: U_WORD
  4795.       min_value: 2
  4796.       max_value: 18
  4797.       #lambda: "return x / 10.0;"
  4798.       #write_lambda: "return x * 10.0;"
  4799.       step: 1
  4800.       mode: box
  4801.       entity_category: config
  4802.       skip_updates: 10
  4803.  
  4804.     - platform: modbus_controller
  4805.       modbus_controller_id: sprsun_pc
  4806.       name: ${friendly_name} F39 Stop delta temp grzanie CO
  4807.       address: 0x00C7
  4808.       unit_of_measurement: "°C"
  4809.       #icon: "mdi:fan-speed-1"
  4810.       id: f39_ac_constant_temp_diff
  4811.       value_type: U_WORD
  4812.       min_value: 1
  4813.       max_value: 10
  4814.       #lambda: "return x / 10.0;"
  4815.       #write_lambda: "return x * 10.0;"
  4816.       step: 1
  4817.       mode: box
  4818.       entity_category: config
  4819.       skip_updates: 10
  4820.  
  4821.     - platform: modbus_controller
  4822.       modbus_controller_id: sprsun_pc
  4823.       name: ${friendly_name} P05 Histereza CWU
  4824.       address: 0x00C8
  4825.       unit_of_measurement: "°C"
  4826.       #icon: "mdi:fan-speed-1"
  4827.       id: p05_temp_diff_cwu
  4828.       value_type: U_WORD
  4829.       min_value: 2
  4830.       max_value: 18
  4831.       #lambda: "return x / 10.0;"
  4832.       #write_lambda: "return x * 10.0;"
  4833.       step: 1
  4834.       mode: box
  4835.       entity_category: config
  4836.       skip_updates: 10
  4837.  
  4838.     - platform: modbus_controller
  4839.       modbus_controller_id: sprsun_pc
  4840.       name: ${friendly_name} F40 Stop delta temp grzanie CWU
  4841.       address: 0x00C9
  4842.       unit_of_measurement: "°C"
  4843.       #icon: "mdi:fan-speed-1"
  4844.       id: f40_wt_constant_temp_diff
  4845.       value_type: U_WORD
  4846.       min_value: 0
  4847.       max_value: 10
  4848.       #lambda: "return x / 10.0;"
  4849.       #write_lambda: "return x * 10.0;"
  4850.       step: 1
  4851.       mode: box
  4852.       entity_category: config
  4853.       skip_updates: 10
  4854.  
  4855.     - platform: modbus_controller
  4856.       modbus_controller_id: sprsun_pc
  4857.       name: ${friendly_name} P04 Nastawa CWU
  4858.       address: 0x00CA
  4859.       unit_of_measurement: "°C"
  4860.       #icon: "mdi:fan-speed-1"
  4861.       id: p04_hotwater_setpoint
  4862.       value_type: U_WORD
  4863.       min_value: 10
  4864.       max_value: 60
  4865.       lambda: "return x * 0.5;"
  4866.       write_lambda: "return x / 0.5;"
  4867.       step: 1
  4868.       mode: box
  4869.       entity_category: config
  4870.       skip_updates: 6
  4871.       #(Read only lower 8 bits)
  4872.       bitmask: 0x00FF
  4873.  
  4874.     - platform: modbus_controller
  4875.       modbus_controller_id: sprsun_pc
  4876.       name: ${friendly_name} P02 Nastawa chłodzenie
  4877.       address: 0x00CB
  4878.       unit_of_measurement: "°C"
  4879.       #icon: "mdi:fan-speed-1"
  4880.       id: p02_cooling_setpoint
  4881.       value_type: U_WORD
  4882.       min_value: 12
  4883.       max_value: 30
  4884.       lambda: "return x * 0.5;"
  4885.       write_lambda: "return x / 0.5;"
  4886.       step: 1
  4887.       mode: box
  4888.       entity_category: config
  4889.       skip_updates: 6
  4890.       #(Read only lower 8 bits)
  4891.       bitmask: 0x00FF
  4892.  
  4893.     - platform: modbus_controller
  4894.       modbus_controller_id: sprsun_pc
  4895.       name: ${friendly_name} P01 Nastawa CO
  4896.       address: 0x00CC
  4897.       unit_of_measurement: "°C"
  4898.       #icon: "mdi:fan-speed-1"
  4899.       id: p01_heating_setpoint
  4900.       value_type: U_WORD
  4901.       min_value: 10
  4902.       max_value: 55
  4903.       lambda: "return x * 0.5;"
  4904.       write_lambda: "return x / 0.5;"
  4905.       step: 1
  4906.       mode: box
  4907.       entity_category: config
  4908.       skip_updates: 6
  4909.       #(Read only lower 8 bits)
  4910.       bitmask: 0x00FF
  4911.  
  4912.     - platform: modbus_controller
  4913.       modbus_controller_id: sprsun_pc
  4914.       name: ${friendly_name} F44 Water (CWU) temp calibration
  4915.       address: 0x00CD
  4916.       unit_of_measurement: "°C"
  4917.       #icon: "mdi:fan-speed-1"
  4918.       id: f44_wt_temp_calibration
  4919.       value_type: S_WORD
  4920.       min_value: -30
  4921.       max_value: 30
  4922.       #lambda: "return x * 0.5;"
  4923.       #write_lambda: "return x / 0.5;"
  4924.       step: 1
  4925.       mode: box
  4926.       entity_category: config
  4927.       skip_updates: 10
  4928.  
  4929.     - platform: modbus_controller
  4930.       modbus_controller_id: sprsun_pc
  4931.       name: ${friendly_name} F45 Inlet temp calibration
  4932.       address: 0x00CE
  4933.       unit_of_measurement: "°C"
  4934.       #icon: "mdi:fan-speed-1"
  4935.       id: f45_inlet_temp_calibration
  4936.       value_type: S_WORD
  4937.       min_value: -30
  4938.       max_value: 30
  4939.       #lambda: "return x * 0.5;"
  4940.       #write_lambda: "return x / 0.5;"
  4941.       step: 1
  4942.       mode: box
  4943.       entity_category: config
  4944.       skip_updates: 10
  4945.  
  4946.     - platform: modbus_controller
  4947.       modbus_controller_id: sprsun_pc
  4948.       name: ${friendly_name} F46 Outlet temp calibration
  4949.       address: 0x00CF
  4950.       unit_of_measurement: "°C"
  4951.       #icon: "mdi:fan-speed-1"
  4952.       id: f46_outlet_temp_calibration
  4953.       value_type: S_WORD
  4954.       min_value: -30
  4955.       max_value: 30
  4956.       #lambda: "return x * 0.5;"
  4957.       #write_lambda: "return x / 0.5;"
  4958.       step: 1
  4959.       mode: box
  4960.       entity_category: config
  4961.       skip_updates: 10
  4962.  
  4963.     - platform: modbus_controller
  4964.       modbus_controller_id: sprsun_pc
  4965.       name: ${friendly_name} F49 Water temp offset stp.
  4966.       address: 0x00D0
  4967.       unit_of_measurement: "°C"
  4968.       #icon: "mdi:fan-speed-1"
  4969.       id: f49_wt_temp_offset_stp
  4970.       value_type: U_WORD
  4971.       min_value: 30
  4972.       max_value: 55
  4973.       #lambda: "return x * 0.5;"
  4974.       #write_lambda: "return x / 0.5;"
  4975.       step: 1
  4976.       mode: box
  4977.       entity_category: config
  4978.       skip_updates: 10
  4979.  
  4980.     - platform: modbus_controller
  4981.       modbus_controller_id: sprsun_pc
  4982.       name: ${friendly_name} F50 Inlet temp offset stp.
  4983.       address: 0x00D1
  4984.       unit_of_measurement: "°C"
  4985.       #icon: "mdi:fan-speed-1"
  4986.       id: f50_inlet_temp_offset_stp
  4987.       value_type: U_WORD
  4988.       min_value: 30
  4989.       max_value: 55
  4990.       #lambda: "return x * 0.5;"
  4991.       #write_lambda: "return x / 0.5;"
  4992.       step: 1
  4993.       mode: box
  4994.       entity_category: config
  4995.       skip_updates: 10
  4996.  
  4997.     - platform: modbus_controller
  4998.       modbus_controller_id: sprsun_pc
  4999.       name: ${friendly_name} F42 Water Temp Offset
  5000.       address: 0x00D2
  5001.       unit_of_measurement: "°C"
  5002.       #icon: "mdi:fan-speed-1"
  5003.       id: f42_water_temp_offset
  5004.       value_type: U_WORD
  5005.       min_value: 0
  5006.       max_value: 50
  5007.       #lambda: "return x * 0.5;"
  5008.       #write_lambda: "return x / 0.5;"
  5009.       step: 1
  5010.       mode: box
  5011.       entity_category: config
  5012.       skip_updates: 10
  5013.  
  5014.     - platform: modbus_controller
  5015.       modbus_controller_id: sprsun_pc
  5016.       name: ${friendly_name} F43 Inlet Temp Offset
  5017.       address: 0x00D3
  5018.       unit_of_measurement: "°C"
  5019.       #icon: "mdi:fan-speed-1"
  5020.       id: f43_inlet_temp_offset
  5021.       value_type: U_WORD
  5022.       min_value: 0
  5023.       max_value: 50
  5024.       #lambda: "return x * 0.5;"
  5025.       #write_lambda: "return x / 0.5;"
  5026.       step: 1
  5027.       mode: box
  5028.       entity_category: config
  5029.       skip_updates: 10
  5030.  
  5031.     - platform: modbus_controller
  5032.       modbus_controller_id: sprsun_pc
  5033.       name: ${friendly_name} H03 Defrost in stp.
  5034.       address: 0x00D4
  5035.       unit_of_measurement: "°C"
  5036.       #icon: "mdi:fan-speed-1"
  5037.       id: h03_defrost_in_stp
  5038.       value_type: S_WORD
  5039.       min_value: -15
  5040.       max_value: -1
  5041.       #lambda: "return x * 0.5;"
  5042.       #write_lambda: "return x / 0.5;"
  5043.       step: 1
  5044.       mode: box
  5045.       entity_category: config
  5046.       skip_updates: 10
  5047.  
  5048.     - platform: modbus_controller
  5049.       modbus_controller_id: sprsun_pc
  5050.       name: ${friendly_name} H04 Defrost exit stp.
  5051.       address: 0x00D5
  5052.       unit_of_measurement: "°C"
  5053.       #icon: "mdi:fan-speed-1"
  5054.       id: h04_defrost_exit_stp
  5055.       value_type: U_WORD
  5056.       min_value: 1
  5057.       max_value: 40
  5058.       #lambda: "return x * 0.5;"
  5059.       #write_lambda: "return x / 0.5;"
  5060.       step: 1
  5061.       mode: box
  5062.       entity_category: config
  5063.       skip_updates: 10
  5064.  
  5065.     - platform: modbus_controller
  5066.       modbus_controller_id: sprsun_pc
  5067.       name: ${friendly_name} H07 Def ambi coil 1
  5068.       address: 0x00D6
  5069.       unit_of_measurement: "°C"
  5070.       #icon: "mdi:fan-speed-1"
  5071.       id: h07_def_ambi_coil_1
  5072.       value_type: U_WORD
  5073.       min_value: 0
  5074.       max_value: 30
  5075.       #lambda: "return x * 0.5;"
  5076.       #write_lambda: "return x / 0.5;"
  5077.       step: 1
  5078.       mode: box
  5079.       entity_category: config
  5080.       skip_updates: 10
  5081.  
  5082.     - platform: modbus_controller
  5083.       modbus_controller_id: sprsun_pc
  5084.       name: ${friendly_name} H10 Def ambi coil 2
  5085.       address: 0x00D7
  5086.       unit_of_measurement: "°C"
  5087.       #icon: "mdi:fan-speed-1"
  5088.       id: h10_def_ambi_coil_2
  5089.       value_type: U_WORD
  5090.       min_value: 0
  5091.       max_value: 30
  5092.       #lambda: "return x * 0.5;"
  5093.       #write_lambda: "return x / 0.5;"
  5094.       step: 1
  5095.       mode: box
  5096.       entity_category: config
  5097.       skip_updates: 10
  5098.  
  5099.     - platform: modbus_controller
  5100.       modbus_controller_id: sprsun_pc
  5101.       name: ${friendly_name} H13 Def ambi coil 3
  5102.       address: 0x00D8
  5103.       unit_of_measurement: "°C"
  5104.       #icon: "mdi:fan-speed-1"
  5105.       id: h13_def_ambi_coil_3
  5106.       value_type: U_WORD
  5107.       min_value: 0
  5108.       max_value: 30
  5109.       #lambda: "return x * 0.5;"
  5110.       #write_lambda: "return x / 0.5;"
  5111.       step: 1
  5112.       mode: box
  5113.       entity_category: config
  5114.       skip_updates: 10
  5115.  
  5116.     - platform: modbus_controller
  5117.       modbus_controller_id: sprsun_pc
  5118.       name: ${friendly_name} H09 Defrost ambient stp. 1
  5119.       address: 0x00D9
  5120.       unit_of_measurement: "°C"
  5121.       #icon: "mdi:fan-speed-1"
  5122.       id: h09_defrost_ambi_stp_1
  5123.       value_type: S_WORD
  5124.       min_value: -30
  5125.       max_value: 30
  5126.       #lambda: "return x * 0.5;"
  5127.       #write_lambda: "return x / 0.5;"
  5128.       step: 1
  5129.       mode: box
  5130.       entity_category: config
  5131.       skip_updates: 10
  5132.  
  5133.     - platform: modbus_controller
  5134.       modbus_controller_id: sprsun_pc
  5135.       name: ${friendly_name} H12 Defrost ambient stp. 2
  5136.       address: 0x00DA
  5137.       unit_of_measurement: "°C"
  5138.       #icon: "mdi:fan-speed-1"
  5139.       id: h12_defrost_ambi_stp_2
  5140.       value_type: S_WORD
  5141.       min_value: -30
  5142.       max_value: 30
  5143.       #lambda: "return x * 0.5;"
  5144.       #write_lambda: "return x / 0.5;"
  5145.       step: 1
  5146.       mode: box
  5147.       entity_category: config
  5148.       skip_updates: 10
  5149.  
  5150.     - platform: modbus_controller
  5151.       modbus_controller_id: sprsun_pc
  5152.       name: ${friendly_name} H04 Defrost ambient stp.
  5153.       address: 0x00DB
  5154.       unit_of_measurement: "°C"
  5155.       #icon: "mdi:fan-speed-1"
  5156.       id: h04_defrost_ambi_stp_3
  5157.       value_type: S_WORD
  5158.       min_value: -30
  5159.       max_value: 30
  5160.       #lambda: "return x * 0.5;"
  5161.       #write_lambda: "return x / 0.5;"
  5162.       step: 1
  5163.       mode: box
  5164.       entity_category: config
  5165.       skip_updates: 10
  5166.  
  5167.     - platform: modbus_controller
  5168.       modbus_controller_id: sprsun_pc
  5169.       name: ${friendly_name} A02 MV heating SH 1 (T => 14 °C)
  5170.       address: 0x00DC
  5171.       unit_of_measurement: "°C"
  5172.       #icon: "mdi:fan-speed-1"
  5173.       id: a02_mv_heating_sh_1
  5174.       value_type: S_WORD
  5175.       min_value: -5
  5176.       max_value: 10
  5177.       #lambda: "return x * 0.5;"
  5178.       #write_lambda: "return x / 0.5;"
  5179.       step: 1
  5180.       mode: box
  5181.       entity_category: config
  5182.       skip_updates: 10
  5183.  
  5184.     - platform: modbus_controller
  5185.       modbus_controller_id: sprsun_pc
  5186.       name: ${friendly_name} A03 MV heating SH 2 [9, 14)
  5187.       address: 0x00DD
  5188.       unit_of_measurement: "°C"
  5189.       #icon: "mdi:fan-speed-1"
  5190.       id: a03_mv_heating_sh_2
  5191.       value_type: S_WORD
  5192.       min_value: -5
  5193.       max_value: 10
  5194.       #lambda: "return x * 0.5;"
  5195.       #write_lambda: "return x / 0.5;"
  5196.       step: 1
  5197.       mode: box
  5198.       entity_category: config
  5199.       skip_updates: 10
  5200.  
  5201.     - platform: modbus_controller
  5202.       modbus_controller_id: sprsun_pc
  5203.       name: ${friendly_name} A04 MV heating SH 3 [4, 9)
  5204.       address: 0x00DE
  5205.       unit_of_measurement: "°C"
  5206.       #icon: "mdi:fan-speed-1"
  5207.       id: a04_mv_heating_sh_3
  5208.       value_type: S_WORD
  5209.       min_value: -5
  5210.       max_value: 10
  5211.       #lambda: "return x * 0.5;"
  5212.       #write_lambda: "return x / 0.5;"
  5213.       step: 1
  5214.       mode: box
  5215.       entity_category: config
  5216.       skip_updates: 10
  5217.  
  5218.     - platform: modbus_controller
  5219.       modbus_controller_id: sprsun_pc
  5220.       name: ${friendly_name} A05 MV heating SH 4 [-5, 4)
  5221.       address: 0x00DF
  5222.       unit_of_measurement: "°C"
  5223.       #icon: "mdi:fan-speed-1"
  5224.       id: a05_mv_heating_sh_4
  5225.       value_type: S_WORD
  5226.       min_value: -5
  5227.       max_value: 10
  5228.       #lambda: "return x * 0.5;"
  5229.       #write_lambda: "return x / 0.5;"
  5230.       step: 1
  5231.       mode: box
  5232.       entity_category: config
  5233.       skip_updates: 10
  5234.  
  5235.     - platform: modbus_controller
  5236.       modbus_controller_id: sprsun_pc
  5237.       name: ${friendly_name} A06 MV heating SH 5 [-10, -5)
  5238.       address: 0x00E0
  5239.       unit_of_measurement: "°C"
  5240.       #icon: "mdi:fan-speed-1"
  5241.       id: a06_mv_heating_sh_5
  5242.       value_type: S_WORD
  5243.       min_value: -5
  5244.       max_value: 10
  5245.       #lambda: "return x * 0.5;"
  5246.       #write_lambda: "return x / 0.5;"
  5247.       step: 1
  5248.       mode: box
  5249.       entity_category: config
  5250.       skip_updates: 10
  5251.  
  5252.     - platform: modbus_controller
  5253.       modbus_controller_id: sprsun_pc
  5254.       name: ${friendly_name} A07 MV heating SH 6 [-16, -10)
  5255.       address: 0x00E1
  5256.       unit_of_measurement: "°C"
  5257.       #icon: "mdi:fan-speed-1"
  5258.       id: a07_mv_heating_sh_6
  5259.       value_type: S_WORD
  5260.       min_value: -5
  5261.       max_value: 10
  5262.       #lambda: "return x * 0.5;"
  5263.       #write_lambda: "return x / 0.5;"
  5264.       step: 1
  5265.       mode: box
  5266.       entity_category: config
  5267.       skip_updates: 10
  5268.  
  5269.     - platform: modbus_controller
  5270.       modbus_controller_id: sprsun_pc
  5271.       name: ${friendly_name} A08 MV heating SH 7 [-23, -16)
  5272.       address: 0x00E2
  5273.       unit_of_measurement: "°C"
  5274.       #icon: "mdi:fan-speed-1"
  5275.       id: a08_mv_heating_sh_7
  5276.       value_type: S_WORD
  5277.       min_value: -5
  5278.       max_value: 10
  5279.       #lambda: "return x * 0.5;"
  5280.       #write_lambda: "return x / 0.5;"
  5281.       step: 1
  5282.       mode: box
  5283.       entity_category: config
  5284.       skip_updates: 10
  5285.  
  5286.     - platform: modbus_controller
  5287.       modbus_controller_id: sprsun_pc
  5288.       name: ${friendly_name} A09 MV heating SH 8 (T < -23 °C)
  5289.       address: 0x00E3
  5290.       unit_of_measurement: "°C"
  5291.       #icon: "mdi:fan-speed-1"
  5292.       id: a00_mv_heating_sh_8
  5293.       value_type: S_WORD
  5294.       min_value: -5
  5295.       max_value: 10
  5296.       #lambda: "return x * 0.5;"
  5297.       #write_lambda: "return x / 0.5;"
  5298.       step: 1
  5299.       mode: box
  5300.       entity_category: config
  5301.       skip_updates: 10
  5302.  
  5303.     - platform: modbus_controller
  5304.       modbus_controller_id: sprsun_pc
  5305.       name: ${friendly_name} A10 MV cooling SH 1 (T >=  38 °C)
  5306.       address: 0x00E4
  5307.       unit_of_measurement: "°C"
  5308.       #icon: "mdi:fan-speed-1"
  5309.       id: a10_mv_cooling_sh_1
  5310.       value_type: S_WORD
  5311.       min_value: -5
  5312.       max_value: 10
  5313.       #lambda: "return x * 0.5;"
  5314.       #write_lambda: "return x / 0.5;"
  5315.       step: 1
  5316.       mode: box
  5317.       entity_category: config
  5318.       skip_updates: 10
  5319.  
  5320.     - platform: modbus_controller
  5321.       modbus_controller_id: sprsun_pc
  5322.       name: ${friendly_name} A11 MV cooling SH 2 [30, 38 °C)
  5323.       address: 0x00E5
  5324.       unit_of_measurement: "°C"
  5325.       #icon: "mdi:fan-speed-1"
  5326.       id: a11_mv_cooling_sh_2
  5327.       value_type: S_WORD
  5328.       min_value: -5
  5329.       max_value: 10
  5330.       #lambda: "return x * 0.5;"
  5331.       #write_lambda: "return x / 0.5;"
  5332.       step: 1
  5333.       mode: box
  5334.       entity_category: config
  5335.       skip_updates: 10
  5336.  
  5337.     - platform: modbus_controller
  5338.       modbus_controller_id: sprsun_pc
  5339.       name: ${friendly_name} A12 MV cooling SH 3 [25, 30 °C)
  5340.       address: 0x00E6
  5341.       unit_of_measurement: "°C"
  5342.       #icon: "mdi:fan-speed-1"
  5343.       id: a12_mv_cooling_sh_3
  5344.       value_type: S_WORD
  5345.       min_value: -5
  5346.       max_value: 10
  5347.       #lambda: "return x * 0.5;"
  5348.       #write_lambda: "return x / 0.5;"
  5349.       step: 1
  5350.       mode: box
  5351.       entity_category: config
  5352.       skip_updates: 10
  5353.  
  5354.     - platform: modbus_controller
  5355.       modbus_controller_id: sprsun_pc
  5356.       name: ${friendly_name} A13 MV cooling SH 4 (T < 25 °C)
  5357.       address: 0x00E7
  5358.       unit_of_measurement: "°C"
  5359.       #icon: "mdi:fan-speed-1"
  5360.       id: a13_mv_cooling_sh_4
  5361.       value_type: S_WORD
  5362.       min_value: -5
  5363.       max_value: 10
  5364.       #lambda: "return x * 0.5;"
  5365.       #write_lambda: "return x / 0.5;"
  5366.       step: 1
  5367.       mode: box
  5368.       entity_category: config
  5369.       skip_updates: 10
  5370.  
  5371.     - platform: modbus_controller
  5372.       modbus_controller_id: sprsun_pc
  5373.       name: ${friendly_name} A42 MV exhaust stp.
  5374.       address: 0x00E8
  5375.       unit_of_measurement: "°C"
  5376.       #icon: "mdi:fan-speed-1"
  5377.       id: a42_mv_exhaust_stp
  5378.       value_type: U_WORD
  5379.       min_value: 70
  5380.       max_value: 125
  5381.       #lambda: "return x * 0.5;"
  5382.       #write_lambda: "return x / 0.5;"
  5383.       step: 1
  5384.       mode: box
  5385.       entity_category: config
  5386.       skip_updates: 10
  5387.  
  5388.     - platform: modbus_controller
  5389.       modbus_controller_id: sprsun_pc
  5390.       name: ${friendly_name} B03 AV start ambient
  5391.       address: 0x00E9
  5392.       unit_of_measurement: "°C"
  5393.       #icon: "mdi:fan-speed-1"
  5394.       id: b03_av_start_ambi
  5395.       value_type: U_WORD
  5396.       min_value: 11
  5397.       max_value: 45
  5398.       #lambda: "return x * 0.5;"
  5399.       #write_lambda: "return x / 0.5;"
  5400.       step: 1
  5401.       mode: box
  5402.       entity_category: config
  5403.       skip_updates: 10
  5404.  
  5405.     - platform: modbus_controller
  5406.       modbus_controller_id: sprsun_pc
  5407.       name: ${friendly_name} B09 AV exhaust stp.
  5408.       address: 0x00EA
  5409.       unit_of_measurement: "°C"
  5410.       #icon: "mdi:fan-speed-1"
  5411.       id: b03_av_exhaust_ambi
  5412.       value_type: U_WORD
  5413.       min_value: 70
  5414.       max_value: 120
  5415.       #lambda: "return x * 0.5;"
  5416.       #write_lambda: "return x / 0.5;"
  5417.       step: 1
  5418.       mode: box
  5419.       entity_category: config
  5420.       skip_updates: 10
  5421.  
  5422.     - platform: modbus_controller
  5423.       modbus_controller_id: sprsun_pc
  5424.       name: ${friendly_name} B10 AV off exhaust stp.
  5425.       address: 0x00EB
  5426.       unit_of_measurement: "°C"
  5427.       #icon: "mdi:fan-speed-1"
  5428.       id: b10_av_off_exh_stp
  5429.       value_type: U_WORD
  5430.       min_value: 40
  5431.       max_value: 70
  5432.       #lambda: "return x * 0.5;"
  5433.       #write_lambda: "return x / 0.5;"
  5434.       step: 1
  5435.       mode: box
  5436.       entity_category: config
  5437.       skip_updates: 10
  5438.  
  5439.     - platform: modbus_controller
  5440.       modbus_controller_id: sprsun_pc
  5441.       name: ${friendly_name} B11 AV heating SH 1 (T >= 14 °C)
  5442.       address: 0x00EC
  5443.       unit_of_measurement: "°C"
  5444.       #icon: "mdi:fan-speed-1"
  5445.       id: b11_av_heating_sh_1
  5446.       value_type: S_WORD
  5447.       min_value: -10
  5448.       max_value: 10
  5449.       #lambda: "return x * 0.5;"
  5450.       #write_lambda: "return x / 0.5;"
  5451.       step: 1
  5452.       mode: box
  5453.       entity_category: config
  5454.       skip_updates: 10
  5455.  
  5456.     - platform: modbus_controller
  5457.       modbus_controller_id: sprsun_pc
  5458.       name: ${friendly_name} B12 AV heating SH 2 [9, 14 °C)
  5459.       address: 0x00ED
  5460.       unit_of_measurement: "°C"
  5461.       #icon: "mdi:fan-speed-1"
  5462.       id: b12_av_heating_sh_2
  5463.       value_type: S_WORD
  5464.       min_value: -10
  5465.       max_value: 10
  5466.       #lambda: "return x * 0.5;"
  5467.       #write_lambda: "return x / 0.5;"
  5468.       step: 1
  5469.       mode: box
  5470.       entity_category: config
  5471.       skip_updates: 10
  5472.  
  5473.     - platform: modbus_controller
  5474.       modbus_controller_id: sprsun_pc
  5475.       name: ${friendly_name} B13 AV heating SH 3 [4, 9 °C)
  5476.       address: 0x00EE
  5477.       unit_of_measurement: "°C"
  5478.       #icon: "mdi:fan-speed-1"
  5479.       id: b13_av_heating_sh_3
  5480.       value_type: S_WORD
  5481.       min_value: -10
  5482.       max_value: 10
  5483.       #lambda: "return x * 0.5;"
  5484.       #write_lambda: "return x / 0.5;"
  5485.       step: 1
  5486.       mode: box
  5487.       entity_category: config
  5488.       skip_updates: 10
  5489.      
  5490.     - platform: modbus_controller
  5491.       modbus_controller_id: sprsun_pc
  5492.       name: ${friendly_name} B14 AV heating SH 4 [-5, 4 °C)
  5493.       address: 0x00EF
  5494.       unit_of_measurement: "°C"
  5495.       #icon: "mdi:fan-speed-1"
  5496.       id: b14_av_heating_sh_4
  5497.       value_type: S_WORD
  5498.       min_value: -10
  5499.       max_value: 10
  5500.       #lambda: "return x * 0.5;"
  5501.       #write_lambda: "return x / 0.5;"
  5502.       step: 1
  5503.       mode: box
  5504.       entity_category: config
  5505.       skip_updates: 10
  5506.  
  5507.     - platform: modbus_controller
  5508.       modbus_controller_id: sprsun_pc
  5509.       name: ${friendly_name} B15 AV heating SH 5 [-10, -5 °C)
  5510.       address: 0x00F0
  5511.       unit_of_measurement: "°C"
  5512.       #icon: "mdi:fan-speed-1"
  5513.       id: b15_av_heating_sh_5
  5514.       value_type: S_WORD
  5515.       min_value: -10
  5516.       max_value: 10
  5517.       #lambda: "return x * 0.5;"
  5518.       #write_lambda: "return x / 0.5;"
  5519.       step: 1
  5520.       mode: box
  5521.       entity_category: config
  5522.       skip_updates: 10
  5523.  
  5524.     - platform: modbus_controller
  5525.       modbus_controller_id: sprsun_pc
  5526.       name: ${friendly_name} B16 AV heating SH 6 [-16, -10 °C)
  5527.       address: 0x00F1
  5528.       unit_of_measurement: "°C"
  5529.       #icon: "mdi:fan-speed-1"
  5530.       id: b16_av_heating_sh_6
  5531.       value_type: S_WORD
  5532.       min_value: -10
  5533.       max_value: 10
  5534.       #lambda: "return x * 0.5;"
  5535.       #write_lambda: "return x / 0.5;"
  5536.       step: 1
  5537.       mode: box
  5538.       entity_category: config
  5539.       skip_updates: 10
  5540.  
  5541.     - platform: modbus_controller
  5542.       modbus_controller_id: sprsun_pc
  5543.       name: ${friendly_name} B17 AV heating SH 7 [-23, -16 °C)
  5544.       address: 0x00F2
  5545.       unit_of_measurement: "°C"
  5546.       #icon: "mdi:fan-speed-1"
  5547.       id: b17_av_heating_sh_7
  5548.       value_type: S_WORD
  5549.       min_value: -10
  5550.       max_value: 10
  5551.       #lambda: "return x * 0.5;"
  5552.       #write_lambda: "return x / 0.5;"
  5553.       step: 1
  5554.       mode: box
  5555.       entity_category: config
  5556.       skip_updates: 10
  5557.  
  5558.     - platform: modbus_controller
  5559.       modbus_controller_id: sprsun_pc
  5560.       name: ${friendly_name} B18 AV heating SH 8 (T < -23 °C)
  5561.       address: 0x00F3
  5562.       unit_of_measurement: "°C"
  5563.       #icon: "mdi:fan-speed-1"
  5564.       id: b18_av_heating_sh_8
  5565.       value_type: S_WORD
  5566.       min_value: -10
  5567.       max_value: 10
  5568.       #lambda: "return x * 0.5;"
  5569.       #write_lambda: "return x / 0.5;"
  5570.       step: 1
  5571.       mode: box
  5572.       entity_category: config
  5573.       skip_updates: 10
  5574.  
  5575.     - platform: modbus_controller
  5576.       modbus_controller_id: sprsun_pc
  5577.       name: ${friendly_name} D21 AC fan switch ambi. 1
  5578.       address: 0x00F4
  5579.       unit_of_measurement: "°C"
  5580.       #icon: "mdi:fan-speed-1"
  5581.       id: d21_ac_fan_switch_ambi_1
  5582.       value_type: S_WORD
  5583.       min_value: -10
  5584.       max_value: 50
  5585.       #lambda: "return x * 0.5;"
  5586.       #write_lambda: "return x / 0.5;"
  5587.       step: 1
  5588.       mode: box
  5589.       entity_category: config
  5590.       skip_updates: 10
  5591.  
  5592.     - platform: modbus_controller
  5593.       modbus_controller_id: sprsun_pc
  5594.       name: ${friendly_name} D22 AC fan switch ambi. 2
  5595.       address: 0x00F5
  5596.       unit_of_measurement: "°C"
  5597.       #icon: "mdi:fan-speed-1"
  5598.       id: d22_ac_fan_switch_ambi_2
  5599.       value_type: S_WORD
  5600.       min_value: -10
  5601.       max_value: 50
  5602.       #lambda: "return x * 0.5;"
  5603.       #write_lambda: "return x / 0.5;"
  5604.       step: 1
  5605.       mode: box
  5606.       entity_category: config
  5607.       skip_updates: 10
  5608.  
  5609.     - platform: modbus_controller
  5610.       modbus_controller_id: sprsun_pc
  5611.       name: ${friendly_name} R16 Exhaust high TP0
  5612.       address: 0x00F6
  5613.       unit_of_measurement: "°C"
  5614.       #icon: "mdi:fan-speed-1"
  5615.       id: r16_exhaust_high_tp0
  5616.       value_type: U_WORD
  5617.       min_value: 50
  5618.       max_value: 125
  5619.       #lambda: "return x * 0.5;"
  5620.       #write_lambda: "return x / 0.5;"
  5621.       step: 1
  5622.       mode: box
  5623.       entity_category: config
  5624.       skip_updates: 10
  5625.  
  5626.     - platform: modbus_controller
  5627.       modbus_controller_id: sprsun_pc
  5628.       name: ${friendly_name} R17 Exhaust high TP1
  5629.       address: 0x00F7
  5630.       unit_of_measurement: "°C"
  5631.       #icon: "mdi:fan-speed-1"
  5632.       id: r17_exhaust_high_tp1
  5633.       value_type: U_WORD
  5634.       min_value: 50
  5635.       max_value: 125
  5636.       #lambda: "return x * 0.5;"
  5637.       #write_lambda: "return x / 0.5;"
  5638.       step: 1
  5639.       mode: box
  5640.       entity_category: config
  5641.       skip_updates: 10
  5642.  
  5643.     - platform: modbus_controller
  5644.       modbus_controller_id: sprsun_pc
  5645.       name: ${friendly_name} R18 Exhaust high TP2
  5646.       address: 0x00F8
  5647.       unit_of_measurement: "°C"
  5648.       #icon: "mdi:fan-speed-1"
  5649.       id: r18_exhaust_high_tp2
  5650.       value_type: U_WORD
  5651.       min_value: 50
  5652.       max_value: 125
  5653.       #lambda: "return x * 0.5;"
  5654.       #write_lambda: "return x / 0.5;"
  5655.       step: 1
  5656.       mode: box
  5657.       entity_category: config
  5658.       skip_updates: 10
  5659.  
  5660.     - platform: modbus_controller
  5661.       modbus_controller_id: sprsun_pc
  5662.       name: ${friendly_name} R19 Exhaust high TP3
  5663.       address: 0x00F9
  5664.       unit_of_measurement: "°C"
  5665.       #icon: "mdi:fan-speed-1"
  5666.       id: r19_exhaust_high_tp3
  5667.       value_type: U_WORD
  5668.       min_value: 50
  5669.       max_value: 125
  5670.       #lambda: "return x * 0.5;"
  5671.       #write_lambda: "return x / 0.5;"
  5672.       step: 1
  5673.       mode: box
  5674.       entity_category: config
  5675.       skip_updates: 10
  5676.  
  5677.     - platform: modbus_controller
  5678.       modbus_controller_id: sprsun_pc
  5679.       name: ${friendly_name} R19 Exhaust high TP4
  5680.       address: 0x00FA
  5681.       unit_of_measurement: "°C"
  5682.       #icon: "mdi:fan-speed-1"
  5683.       id: r20_exhaust_high_tp4
  5684.       value_type: U_WORD
  5685.       min_value: 50
  5686.       max_value: 125
  5687.       #lambda: "return x * 0.5;"
  5688.       #write_lambda: "return x / 0.5;"
  5689.       step: 1
  5690.       mode: box
  5691.       entity_category: config
  5692.       skip_updates: 10
  5693.  
  5694.     - platform: modbus_controller
  5695.       modbus_controller_id: sprsun_pc
  5696.       name: ${friendly_name} Manual frequency setting
  5697.       address: 0x00FB
  5698.       unit_of_measurement: "Hz"
  5699.       #icon: "mdi:fan-speed-1"
  5700.       id: manual_frequency_setting
  5701.       value_type: U_WORD
  5702.       min_value: 30
  5703.       max_value: 120
  5704.       #lambda: "return x * 0.5;"
  5705.       #write_lambda: "return x / 0.5;"
  5706.       step: 1
  5707.       mode: box
  5708.       entity_category: config
  5709.       skip_updates: 10
  5710.  
  5711.     - platform: modbus_controller
  5712.       modbus_controller_id: sprsun_pc
  5713.       name: ${friendly_name} Freq of water R00 (T >= 14 °C)
  5714.       address: 0x00FC
  5715.       unit_of_measurement: "Hz"
  5716.       #icon: "mdi:fan-speed-1"
  5717.       id: freq_of_water_r00
  5718.       value_type: U_WORD
  5719.       min_value: 30
  5720.       max_value: 120
  5721.       #lambda: "return x * 0.5;"
  5722.       #write_lambda: "return x / 0.5;"
  5723.       step: 1
  5724.       mode: box
  5725.       entity_category: config
  5726.       skip_updates: 10
  5727.  
  5728.     - platform: modbus_controller
  5729.       modbus_controller_id: sprsun_pc
  5730.       name: ${friendly_name} Freq of water R01 [9, 14 °C)
  5731.       address: 0x00FD
  5732.       unit_of_measurement: "Hz"
  5733.       #icon: "mdi:fan-speed-1"
  5734.       id: freq_of_water_r01
  5735.       value_type: U_WORD
  5736.       min_value: 30
  5737.       max_value: 120
  5738.       #lambda: "return x * 0.5;"
  5739.       #write_lambda: "return x / 0.5;"
  5740.       step: 1
  5741.       mode: box
  5742.       entity_category: config
  5743.       skip_updates: 10
  5744.  
  5745.     - platform: modbus_controller
  5746.       modbus_controller_id: sprsun_pc
  5747.       name: ${friendly_name} Freq of water R02 [4, 9 °C)
  5748.       address: 0x00FE
  5749.       unit_of_measurement: "Hz"
  5750.       #icon: "mdi:fan-speed-1"
  5751.       id: freq_of_water_r02
  5752.       value_type: U_WORD
  5753.       min_value: 30
  5754.       max_value: 120
  5755.       #lambda: "return x * 0.5;"
  5756.       #write_lambda: "return x / 0.5;"
  5757.       step: 1
  5758.       mode: box
  5759.       entity_category: config
  5760.       skip_updates: 10
  5761.  
  5762.     - platform: modbus_controller
  5763.       modbus_controller_id: sprsun_pc
  5764.       name: ${friendly_name} Freq of water R03 [-5, 4 °C)
  5765.       address: 0x00FF
  5766.       unit_of_measurement: "Hz"
  5767.       #icon: "mdi:fan-speed-1"
  5768.       id: freq_of_water_r03
  5769.       value_type: U_WORD
  5770.       min_value: 30
  5771.       max_value: 120
  5772.       #lambda: "return x * 0.5;"
  5773.       #write_lambda: "return x / 0.5;"
  5774.       step: 1
  5775.       mode: box
  5776.       entity_category: config
  5777.       skip_updates: 10
  5778.  
  5779.     - platform: modbus_controller
  5780.       modbus_controller_id: sprsun_pc
  5781.       name: ${friendly_name} Freq of water R30 [-10, -5 °C)
  5782.       address: 0x0100
  5783.       unit_of_measurement: "Hz"
  5784.       #icon: "mdi:fan-speed-1"
  5785.       id: freq_of_water_r30
  5786.       value_type: U_WORD
  5787.       min_value: 30
  5788.       max_value: 120
  5789.       #lambda: "return x * 0.5;"
  5790.       #write_lambda: "return x / 0.5;"
  5791.       step: 1
  5792.       mode: box
  5793.       entity_category: config
  5794.       skip_updates: 10
  5795.  
  5796.     - platform: modbus_controller
  5797.       modbus_controller_id: sprsun_pc
  5798.       name: ${friendly_name} Freq of water R31 [-16, -10 °C)
  5799.       address: 0x0101
  5800.       unit_of_measurement: "Hz"
  5801.       #icon: "mdi:fan-speed-1"
  5802.       id: freq_of_water_r31
  5803.       value_type: U_WORD
  5804.       min_value: 30
  5805.       max_value: 120
  5806.       #lambda: "return x * 0.5;"
  5807.       #write_lambda: "return x / 0.5;"
  5808.       step: 1
  5809.       mode: box
  5810.       entity_category: config
  5811.       skip_updates: 10
  5812.  
  5813.     - platform: modbus_controller
  5814.       modbus_controller_id: sprsun_pc
  5815.       name: ${friendly_name} Freq of water R32 [-23, -16 °C)
  5816.       address: 0x0102
  5817.       unit_of_measurement: "Hz"
  5818.       #icon: "mdi:fan-speed-1"
  5819.       id: freq_of_water_r32
  5820.       value_type: U_WORD
  5821.       min_value: 30
  5822.       max_value: 120
  5823.       #lambda: "return x * 0.5;"
  5824.       #write_lambda: "return x / 0.5;"
  5825.       step: 1
  5826.       mode: box
  5827.       entity_category: config
  5828.       skip_updates: 10
  5829.  
  5830.     - platform: modbus_controller
  5831.       modbus_controller_id: sprsun_pc
  5832.       name: ${friendly_name} Freq of water R33 (T < -23 °C)
  5833.       address: 0x0103
  5834.       unit_of_measurement: "Hz"
  5835.       #icon: "mdi:fan-speed-1"
  5836.       id: freq_of_water_r33
  5837.       value_type: U_WORD
  5838.       min_value: 30
  5839.       max_value: 120
  5840.       #lambda: "return x * 0.5;"
  5841.       #write_lambda: "return x / 0.5;"
  5842.       step: 1
  5843.       mode: box
  5844.       entity_category: config
  5845.       skip_updates: 10
  5846.  
  5847. #############
  5848.     - platform: modbus_controller
  5849.       modbus_controller_id: sprsun_pc
  5850.       name: ${friendly_name} Freq of heat R04 (T >= 14 °C)
  5851.       address: 0x0104
  5852.       unit_of_measurement: "Hz"
  5853.       #icon: "mdi:fan-speed-1"
  5854.       id: freq_of_heat_r04
  5855.       value_type: U_WORD
  5856.       min_value: 30
  5857.       max_value: 120
  5858.       #lambda: "return x * 0.5;"
  5859.       #write_lambda: "return x / 0.5;"
  5860.       step: 1
  5861.       mode: box
  5862.       entity_category: config
  5863.       skip_updates: 10
  5864.  
  5865.     - platform: modbus_controller
  5866.       modbus_controller_id: sprsun_pc
  5867.       name: ${friendly_name} Freq of heat R05 [9, 14 °C)
  5868.       address: 0x0105
  5869.       unit_of_measurement: "Hz"
  5870.       #icon: "mdi:fan-speed-1"
  5871.       id: freq_of_heat_r05
  5872.       value_type: U_WORD
  5873.       min_value: 30
  5874.       max_value: 120
  5875.       #lambda: "return x * 0.5;"
  5876.       #write_lambda: "return x / 0.5;"
  5877.       step: 1
  5878.       mode: box
  5879.       entity_category: config
  5880.       skip_updates: 10
  5881.  
  5882.     - platform: modbus_controller
  5883.       modbus_controller_id: sprsun_pc
  5884.       name: ${friendly_name} Freq of heat R06 [4, 9 °C)
  5885.       address: 0x0106
  5886.       unit_of_measurement: "Hz"
  5887.       #icon: "mdi:fan-speed-1"
  5888.       id: freq_of_heat_r06
  5889.       value_type: U_WORD
  5890.       min_value: 30
  5891.       max_value: 120
  5892.       #lambda: "return x * 0.5;"
  5893.       #write_lambda: "return x / 0.5;"
  5894.       step: 1
  5895.       mode: box
  5896.       entity_category: config
  5897.       skip_updates: 10
  5898.  
  5899.     - platform: modbus_controller
  5900.       modbus_controller_id: sprsun_pc
  5901.       name: ${friendly_name} Freq of heat R07 [-5, 4 °C)
  5902.       address: 0x0107
  5903.       unit_of_measurement: "Hz"
  5904.       #icon: "mdi:fan-speed-1"
  5905.       id: freq_of_heat_r07
  5906.       value_type: U_WORD
  5907.       min_value: 30
  5908.       max_value: 120
  5909.       #lambda: "return x * 0.5;"
  5910.       #write_lambda: "return x / 0.5;"
  5911.       step: 1
  5912.       mode: box
  5913.       entity_category: config
  5914.       skip_updates: 10
  5915.  
  5916.     - platform: modbus_controller
  5917.       modbus_controller_id: sprsun_pc
  5918.       name: ${friendly_name} Freq of heat R08 [-10, -5 °C)
  5919.       address: 0x0108
  5920.       unit_of_measurement: "Hz"
  5921.       #icon: "mdi:fan-speed-1"
  5922.       id: freq_of_heat_r08
  5923.       value_type: U_WORD
  5924.       min_value: 30
  5925.       max_value: 120
  5926.       #lambda: "return x * 0.5;"
  5927.       #write_lambda: "return x / 0.5;"
  5928.       step: 1
  5929.       mode: box
  5930.       entity_category: config
  5931.       skip_updates: 10
  5932.  
  5933.     - platform: modbus_controller
  5934.       modbus_controller_id: sprsun_pc
  5935.       name: ${friendly_name} Freq of heat R09 [-16, -10 °C)
  5936.       address: 0x0109
  5937.       unit_of_measurement: "Hz"
  5938.       #icon: "mdi:fan-speed-1"
  5939.       id: freq_of_heat_r09
  5940.       value_type: U_WORD
  5941.       min_value: 30
  5942.       max_value: 120
  5943.       #lambda: "return x * 0.5;"
  5944.       #write_lambda: "return x / 0.5;"
  5945.       step: 1
  5946.       mode: box
  5947.       entity_category: config
  5948.       skip_updates: 10
  5949.  
  5950.     - platform: modbus_controller
  5951.       modbus_controller_id: sprsun_pc
  5952.       name: ${friendly_name} Freq of heat R10 [-23, -16 °C)
  5953.       address: 0x010A
  5954.       unit_of_measurement: "Hz"
  5955.       #icon: "mdi:fan-speed-1"
  5956.       id: freq_of_heat_r10
  5957.       value_type: U_WORD
  5958.       min_value: 30
  5959.       max_value: 120
  5960.       #lambda: "return x * 0.5;"
  5961.       #write_lambda: "return x / 0.5;"
  5962.       step: 1
  5963.       mode: box
  5964.       entity_category: config
  5965.       skip_updates: 10
  5966.  
  5967.     - platform: modbus_controller
  5968.       modbus_controller_id: sprsun_pc
  5969.       name: ${friendly_name} Freq of heat R11 (T < -23 °C)
  5970.       address: 0x010B
  5971.       unit_of_measurement: "Hz"
  5972.       #icon: "mdi:fan-speed-1"
  5973.       id: freq_of_heat_r11
  5974.       value_type: U_WORD
  5975.       min_value: 30
  5976.       max_value: 120
  5977.       #lambda: "return x * 0.5;"
  5978.       #write_lambda: "return x / 0.5;"
  5979.       step: 1
  5980.       mode: box
  5981.       entity_category: config
  5982.       skip_updates: 10
  5983.  
  5984. ####################
  5985.  
  5986.     - platform: modbus_controller
  5987.       modbus_controller_id: sprsun_pc
  5988.       name: ${friendly_name} Freq of cool R12 (T >= 38 °C)
  5989.       address: 0x010C
  5990.       unit_of_measurement: "Hz"
  5991.       #icon: "mdi:fan-speed-1"
  5992.       id: freq_of_cool_r12
  5993.       value_type: U_WORD
  5994.       min_value: 30
  5995.       max_value: 120
  5996.       #lambda: "return x * 0.5;"
  5997.       #write_lambda: "return x / 0.5;"
  5998.       step: 1
  5999.       mode: box
  6000.       entity_category: config
  6001.       skip_updates: 10
  6002.  
  6003.     - platform: modbus_controller
  6004.       modbus_controller_id: sprsun_pc
  6005.       name: ${friendly_name} Freq of cool R13 [30, 38 °C)
  6006.       address: 0x010D
  6007.       unit_of_measurement: "Hz"
  6008.       #icon: "mdi:fan-speed-1"
  6009.       id: freq_of_cool_r13
  6010.       value_type: U_WORD
  6011.       min_value: 30
  6012.       max_value: 120
  6013.       #lambda: "return x * 0.5;"
  6014.       #write_lambda: "return x / 0.5;"
  6015.       step: 1
  6016.       mode: box
  6017.       entity_category: config
  6018.       skip_updates: 10
  6019.  
  6020.     - platform: modbus_controller
  6021.       modbus_controller_id: sprsun_pc
  6022.       name: ${friendly_name} Freq of cool R14 [25, 30 °C)
  6023.       address: 0x010E
  6024.       unit_of_measurement: "Hz"
  6025.       #icon: "mdi:fan-speed-1"
  6026.       id: freq_of_cool_r14
  6027.       value_type: U_WORD
  6028.       min_value: 30
  6029.       max_value: 120
  6030.       #lambda: "return x * 0.5;"
  6031.       #write_lambda: "return x / 0.5;"
  6032.       step: 1
  6033.       mode: box
  6034.       entity_category: config
  6035.       skip_updates: 10
  6036.  
  6037.     - platform: modbus_controller
  6038.       modbus_controller_id: sprsun_pc
  6039.       name: ${friendly_name} Freq of cool R15 (T < 25 °C)
  6040.       address: 0x010F
  6041.       unit_of_measurement: "Hz"
  6042.       #icon: "mdi:fan-speed-1"
  6043.       id: freq_of_cool_r15
  6044.       value_type: U_WORD
  6045.       min_value: 30
  6046.       max_value: 120
  6047.       #lambda: "return x * 0.5;"
  6048.       #write_lambda: "return x / 0.5;"
  6049.       step: 1
  6050.       mode: box
  6051.       entity_category: config
  6052.       skip_updates: 10
  6053.  
  6054. ##################################################
  6055.  
  6056.     - platform: modbus_controller
  6057.       modbus_controller_id: sprsun_pc
  6058.       name: ${friendly_name} Freq adj lower limit R21
  6059.       address: 0x0110
  6060.       unit_of_measurement: "Hz"
  6061.       #icon: "mdi:fan-speed-1"
  6062.       id: freq_adj_lower_limit_r21
  6063.       value_type: U_WORD
  6064.       min_value: 0
  6065.       max_value: 125
  6066.       #lambda: "return x * 0.5;"
  6067.       #write_lambda: "return x / 0.5;"
  6068.       step: 1
  6069.       mode: box
  6070.       entity_category: config
  6071.       skip_updates: 10
  6072.  
  6073.     - platform: modbus_controller
  6074.       modbus_controller_id: sprsun_pc
  6075.       name: ${friendly_name} Freq adj lower limit R22
  6076.       address: 0x0111
  6077.       unit_of_measurement: "Hz"
  6078.       #icon: "mdi:fan-speed-1"
  6079.       id: freq_adj_lower_limit_r22
  6080.       value_type: U_WORD
  6081.       min_value: 0
  6082.       max_value: 125
  6083.       #lambda: "return x * 0.5;"
  6084.       #write_lambda: "return x / 0.5;"
  6085.       step: 1
  6086.       mode: box
  6087.       entity_category: config
  6088.       skip_updates: 10
  6089.  
  6090.     - platform: modbus_controller
  6091.       modbus_controller_id: sprsun_pc
  6092.       name: ${friendly_name} Freq adj lower limit R23
  6093.       address: 0x0112
  6094.       unit_of_measurement: "Hz"
  6095.       #icon: "mdi:fan-speed-1"
  6096.       id: freq_adj_lower_limit_r23
  6097.       value_type: U_WORD
  6098.       min_value: 0
  6099.       max_value: 125
  6100.       #lambda: "return x * 0.5;"
  6101.       #write_lambda: "return x / 0.5;"
  6102.       step: 1
  6103.       mode: box
  6104.       entity_category: config
  6105.       skip_updates: 10
  6106.  
  6107.     - platform: modbus_controller
  6108.       modbus_controller_id: sprsun_pc
  6109.       name: ${friendly_name} Freq adj lower limit R24
  6110.       address: 0x0113
  6111.       unit_of_measurement: "Hz"
  6112.       #icon: "mdi:fan-speed-1"
  6113.       id: freq_adj_lower_limit_r24
  6114.       value_type: U_WORD
  6115.       min_value: 0
  6116.       max_value: 125
  6117.       #lambda: "return x * 0.5;"
  6118.       #write_lambda: "return x / 0.5;"
  6119.       step: 1
  6120.       mode: box
  6121.       entity_category: config
  6122.       skip_updates: 10
  6123.  
  6124.     - platform: modbus_controller
  6125.       modbus_controller_id: sprsun_pc
  6126.       name: ${friendly_name} Freq adj upper limit R25
  6127.       address: 0x0114
  6128.       unit_of_measurement: "Hz"
  6129.       #icon: "mdi:fan-speed-1"
  6130.       id: freq_adj_upper_limit_r25
  6131.       value_type: U_WORD
  6132.       min_value: 0
  6133.       max_value: 125
  6134.       #lambda: "return x * 0.5;"
  6135.       #write_lambda: "return x / 0.5;"
  6136.       step: 1
  6137.       mode: box
  6138.       entity_category: config
  6139.       skip_updates: 10
  6140.  
  6141.     - platform: modbus_controller
  6142.       modbus_controller_id: sprsun_pc
  6143.       name: ${friendly_name} Freq adj upper limit R26
  6144.       address: 0x0115
  6145.       unit_of_measurement: "Hz"
  6146.       #icon: "mdi:fan-speed-1"
  6147.       id: freq_adj_upper_limit_r26
  6148.       value_type: U_WORD
  6149.       min_value: 0
  6150.       max_value: 125
  6151.       #lambda: "return x * 0.5;"
  6152.       #write_lambda: "return x / 0.5;"
  6153.       step: 1
  6154.       mode: box
  6155.       entity_category: config
  6156.       skip_updates: 10
  6157.  
  6158.     - platform: modbus_controller
  6159.       modbus_controller_id: sprsun_pc
  6160.       name: ${friendly_name} Freq adj upper limit R27
  6161.       address: 0x0116
  6162.       unit_of_measurement: "Hz"
  6163.       #icon: "mdi:fan-speed-1"
  6164.       id: freq_adj_upper_limit_r27
  6165.       value_type: U_WORD
  6166.       min_value: 0
  6167.       max_value: 125
  6168.       #lambda: "return x * 0.5;"
  6169.       #write_lambda: "return x / 0.5;"
  6170.       step: 1
  6171.       mode: box
  6172.       entity_category: config
  6173.       skip_updates: 10
  6174.  
  6175.     - platform: modbus_controller
  6176.       modbus_controller_id: sprsun_pc
  6177.       name: ${friendly_name} Freq adj upper limit R28
  6178.       address: 0x0117
  6179.       unit_of_measurement: "Hz"
  6180.       #icon: "mdi:fan-speed-1"
  6181.       id: freq_adj_upper_limit_r28
  6182.       value_type: U_WORD
  6183.       min_value: 0
  6184.       max_value: 125
  6185.       #lambda: "return x * 0.5;"
  6186.       #write_lambda: "return x / 0.5;"
  6187.       step: 1
  6188.       mode: box
  6189.       entity_category: config
  6190.       skip_updates: 10
  6191. ############################################
  6192.  
  6193. ###Timeband 1 czas
  6194.     - platform: modbus_controller
  6195.       modbus_controller_id: sprsun_pc
  6196.       name: ${friendly_name} Timeband 1 ON hour
  6197.       address: 0x0119
  6198.       unit_of_measurement: "H"
  6199.       #icon: "mdi:fan-speed-1"
  6200.       id: timeband_1_on_hour
  6201.       value_type: U_WORD
  6202.       min_value: 0
  6203.       max_value: 23
  6204.       #lambda: "return x * 0.5;"S
  6205.       #write_lambda: "return x / 0.5;"
  6206.       step: 1
  6207.       mode: box
  6208.       entity_category: config
  6209.       skip_updates: 10      
  6210.  
  6211.     - platform: modbus_controller
  6212.       modbus_controller_id: sprsun_pc
  6213.       name: ${friendly_name} Timeband 1 ON minutes
  6214.       address: 0x011A
  6215.       unit_of_measurement: "M"
  6216.       #icon: "mdi:fan-speed-1"
  6217.       id: timeband_1_on_minutes
  6218.       value_type: U_WORD
  6219.       min_value: 0
  6220.       max_value: 59
  6221.       #lambda: "return x * 0.5;"
  6222.       #write_lambda: "return x / 0.5;"
  6223.       step: 1
  6224.       mode: box
  6225.       entity_category: config
  6226.       skip_updates: 10
  6227.  
  6228.     - platform: modbus_controller
  6229.       modbus_controller_id: sprsun_pc
  6230.       name: ${friendly_name} Timeband 1 OFF hour
  6231.       address: 0x011B
  6232.       unit_of_measurement: "H"
  6233.       #icon: "mdi:fan-speed-1"
  6234.       id: timeband_1_off_hour
  6235.       value_type: U_WORD
  6236.       min_value: 0
  6237.       max_value: 23
  6238.       #lambda: "return x * 0.5;"
  6239.       #write_lambda: "return x / 0.5;"
  6240.       step: 1
  6241.       mode: box
  6242.       entity_category: config
  6243.       skip_updates: 10
  6244.  
  6245.     - platform: modbus_controller
  6246.       modbus_controller_id: sprsun_pc
  6247.       name: ${friendly_name} Timeband 1 OFF minutes
  6248.       address: 0x011C
  6249.       unit_of_measurement: "M"
  6250.       #icon: "mdi:fan-speed-1"
  6251.       id: timeband_1_off_minutes
  6252.       value_type: U_WORD
  6253.       min_value: 0
  6254.       max_value: 59
  6255.       #lambda: "return x * 0.5;"
  6256.       #write_lambda: "return x / 0.5;"
  6257.       step: 1
  6258.       mode: box
  6259.       entity_category: config
  6260.       skip_updates: 10
  6261.  
  6262.  
  6263. ###Timeband 2 czas
  6264.     - platform: modbus_controller
  6265.       modbus_controller_id: sprsun_pc
  6266.       name: ${friendly_name} Timeband 2 ON hour
  6267.       address: 0x011D
  6268.       unit_of_measurement: "H"
  6269.       #icon: "mdi:fan-speed-1"
  6270.       id: timeband_2_on_hour
  6271.       value_type: U_WORD
  6272.       min_value: 0
  6273.       max_value: 23
  6274.       #lambda: "return x * 0.5;"S
  6275.       #write_lambda: "return x / 0.5;"
  6276.       step: 1
  6277.       mode: box
  6278.       entity_category: config
  6279.       skip_updates: 10
  6280.  
  6281.     - platform: modbus_controller
  6282.       modbus_controller_id: sprsun_pc
  6283.       name: ${friendly_name} Timeband 2 ON minutes
  6284.       address: 0x011E
  6285.       unit_of_measurement: "M"
  6286.       #icon: "mdi:fan-speed-1"
  6287.       id: timeband_2_on_minutes
  6288.       value_type: U_WORD
  6289.       min_value: 0
  6290.       max_value: 59
  6291.       #lambda: "return x * 0.5;"
  6292.       #write_lambda: "return x / 0.5;"
  6293.       step: 1
  6294.       mode: box
  6295.       entity_category: config
  6296.       skip_updates: 10
  6297.  
  6298.     - platform: modbus_controller
  6299.       modbus_controller_id: sprsun_pc
  6300.       name: ${friendly_name} Timeband 2 OFF hour
  6301.       address: 0x011F
  6302.       unit_of_measurement: "H"
  6303.       #icon: "mdi:fan-speed-1"
  6304.       id: timeband_2_off_hour
  6305.       value_type: U_WORD
  6306.       min_value: 0
  6307.       max_value: 23
  6308.       #lambda: "return x * 0.5;"
  6309.       #write_lambda: "return x / 0.5;"
  6310.       step: 1
  6311.       mode: box
  6312.       entity_category: config
  6313.       skip_updates: 10
  6314.  
  6315.     - platform: modbus_controller
  6316.       modbus_controller_id: sprsun_pc
  6317.       name: ${friendly_name} Timeband 2 OFF minutes
  6318.       address: 0x0120
  6319.       unit_of_measurement: "M"
  6320.       #icon: "mdi:fan-speed-1"
  6321.       id: timeband_2_off_minutes
  6322.       value_type: U_WORD
  6323.       min_value: 0
  6324.       max_value: 59
  6325.       #lambda: "return x * 0.5;"
  6326.       #write_lambda: "return x / 0.5;"
  6327.       step: 1
  6328.       mode: box
  6329.       entity_category: config
  6330.       skip_updates: 10
  6331.  
  6332.  
  6333. ###Timeband 3 czas
  6334.     - platform: modbus_controller
  6335.       modbus_controller_id: sprsun_pc
  6336.       name: ${friendly_name} Timeband 3 ON hour
  6337.       address: 0x0121
  6338.       unit_of_measurement: "H"
  6339.       #icon: "mdi:fan-speed-1"
  6340.       id: timeband_3_on_hour
  6341.       value_type: U_WORD
  6342.       min_value: 0
  6343.       max_value: 23
  6344.       #lambda: "return x * 0.5;"S
  6345.       #write_lambda: "return x / 0.5;"
  6346.       step: 1
  6347.       mode: box
  6348.       entity_category: config
  6349.       skip_updates: 10
  6350.  
  6351.     - platform: modbus_controller
  6352.       modbus_controller_id: sprsun_pc
  6353.       name: ${friendly_name} Timeband 3 ON minutes
  6354.       address: 0x0122
  6355.       unit_of_measurement: "M"
  6356.       #icon: "mdi:fan-speed-1"
  6357.       id: timeband_3_on_minutes
  6358.       value_type: U_WORD
  6359.       min_value: 0
  6360.       max_value: 59
  6361.       #lambda: "return x * 0.5;"
  6362.       #write_lambda: "return x / 0.5;"
  6363.       step: 1
  6364.       mode: box
  6365.       entity_category: config
  6366.       skip_updates: 10
  6367.  
  6368.     - platform: modbus_controller
  6369.       modbus_controller_id: sprsun_pc
  6370.       name: ${friendly_name} Timeband 3 OFF hour
  6371.       address: 0x0123
  6372.       unit_of_measurement: "H"
  6373.       #icon: "mdi:fan-speed-1"
  6374.       id: timeband_3_off_hour
  6375.       value_type: U_WORD
  6376.       min_value: 0
  6377.       max_value: 23
  6378.       #lambda: "return x * 0.5;"
  6379.       #write_lambda: "return x / 0.5;"
  6380.       step: 1
  6381.       mode: box
  6382.       entity_category: config
  6383.       skip_updates: 10
  6384.  
  6385.     - platform: modbus_controller
  6386.       modbus_controller_id: sprsun_pc
  6387.       name: ${friendly_name} Timeband 3 OFF minutes
  6388.       address: 0x0124
  6389.       unit_of_measurement: "M"
  6390.       #icon: "mdi:fan-speed-1"
  6391.       id: timeband_3_off_minutes
  6392.       value_type: U_WORD
  6393.       min_value: 0
  6394.       max_value: 59
  6395.       #lambda: "return x * 0.5;"
  6396.       #write_lambda: "return x / 0.5;"
  6397.       step: 1
  6398.       mode: box
  6399.       entity_category: config
  6400.       skip_updates: 10
  6401.      
  6402. #################################################################
  6403.  
  6404. #Częstotliwość w trybie ECO dla CWU
  6405.     - platform: modbus_controller
  6406.       modbus_controller_id: sprsun_pc
  6407.       name: ${friendly_name} ECO freq of water R34
  6408.       address: 0x012D
  6409.       unit_of_measurement: "Hz"
  6410.       #icon: "mdi:fan-speed-1"
  6411.       id: eco_freq_of_water_r34
  6412.       value_type: U_WORD
  6413.       min_value: 30
  6414.       max_value: 120
  6415.       #lambda: "return x * 0.5;"
  6416.       #write_lambda: "return x / 0.5;"
  6417.       step: 1
  6418.       mode: box
  6419.       entity_category: config
  6420.       skip_updates: 10
  6421.  
  6422.     - platform: modbus_controller
  6423.       modbus_controller_id: sprsun_pc
  6424.       name: ${friendly_name} ECO freq of water R35
  6425.       address: 0x012E
  6426.       unit_of_measurement: "Hz"
  6427.       #icon: "mdi:fan-speed-1"
  6428.       id: eco_freq_of_water_r35
  6429.       value_type: U_WORD
  6430.       min_value: 30
  6431.       max_value: 120
  6432.       #lambda: "return x * 0.5;"
  6433.       #write_lambda: "return x / 0.5;"
  6434.       step: 1
  6435.       mode: box
  6436.       entity_category: config
  6437.       skip_updates: 10
  6438.  
  6439.     - platform: modbus_controller
  6440.       modbus_controller_id: sprsun_pc
  6441.       name: ${friendly_name} ECO freq of water R36
  6442.       address: 0x012F
  6443.       unit_of_measurement: "Hz"
  6444.       #icon: "mdi:fan-speed-1"
  6445.       id: eco_freq_of_water_r36
  6446.       value_type: U_WORD
  6447.       min_value: 30
  6448.       max_value: 120
  6449.       #lambda: "return x * 0.5;"
  6450.       #write_lambda: "return x / 0.5;"
  6451.       step: 1
  6452.       mode: box
  6453.       entity_category: config
  6454.       skip_updates: 10
  6455.  
  6456.     - platform: modbus_controller
  6457.       modbus_controller_id: sprsun_pc
  6458.       name: ${friendly_name} ECO freq of water R37
  6459.       address: 0x0130
  6460.       unit_of_measurement: "Hz"
  6461.       #icon: "mdi:fan-speed-1"
  6462.       id: eco_freq_of_water_r37
  6463.       value_type: U_WORD
  6464.       min_value: 30
  6465.       max_value: 120
  6466.       #lambda: "return x * 0.5;"
  6467.       #write_lambda: "return x / 0.5;"
  6468.       step: 1
  6469.       mode: box
  6470.       entity_category: config
  6471.       skip_updates: 10
  6472.  
  6473.     - platform: modbus_controller
  6474.       modbus_controller_id: sprsun_pc
  6475.       name: ${friendly_name} ECO freq of water R38
  6476.       address: 0x0131
  6477.       unit_of_measurement: "Hz"
  6478.       #icon: "mdi:fan-speed-1"
  6479.       id: eco_freq_of_water_r38
  6480.       value_type: U_WORD
  6481.       min_value: 30
  6482.       max_value: 120
  6483.       #lambda: "return x * 0.5;"
  6484.       #write_lambda: "return x / 0.5;"
  6485.       step: 1
  6486.       mode: box
  6487.       entity_category: config
  6488.       skip_updates: 10
  6489.  
  6490.     - platform: modbus_controller
  6491.       modbus_controller_id: sprsun_pc
  6492.       name: ${friendly_name} ECO freq of water R39
  6493.       address: 0x0132
  6494.       unit_of_measurement: "Hz"
  6495.       #icon: "mdi:fan-speed-1"
  6496.       id: eco_freq_of_water_r39
  6497.       value_type: U_WORD
  6498.       min_value: 30
  6499.       max_value: 120
  6500.       #lambda: "return x * 0.5;"
  6501.       #write_lambda: "return x / 0.5;"
  6502.       step: 1
  6503.       mode: box
  6504.       entity_category: config
  6505.       skip_updates: 10
  6506.  
  6507.     - platform: modbus_controller
  6508.       modbus_controller_id: sprsun_pc
  6509.       name: ${friendly_name} ECO freq of water R40
  6510.       address: 0x0133
  6511.       unit_of_measurement: "Hz"
  6512.       #icon: "mdi:fan-speed-1"
  6513.       id: eco_freq_of_water_r40
  6514.       value_type: U_WORD
  6515.       min_value: 30
  6516.       max_value: 120
  6517.       #lambda: "return x * 0.5;"
  6518.       #write_lambda: "return x / 0.5;"
  6519.       step: 1
  6520.       mode: box
  6521.       entity_category: config
  6522.       skip_updates: 10
  6523.  
  6524.     - platform: modbus_controller
  6525.       modbus_controller_id: sprsun_pc
  6526.       name: ${friendly_name} ECO freq of water R41
  6527.       address: 0x0134
  6528.       unit_of_measurement: "Hz"
  6529.       #icon: "mdi:fan-speed-1"
  6530.       id: eco_freq_of_water_r41
  6531.       value_type: U_WORD
  6532.       min_value: 30
  6533.       max_value: 120
  6534.       #lambda: "return x * 0.5;"
  6535.       #write_lambda: "return x / 0.5;"
  6536.       step: 1
  6537.       mode: box
  6538.       entity_category: config
  6539.       skip_updates: 10
  6540.  
  6541. #################################################################
  6542.  
  6543. #Częstotliwość w trybie ECO dla CO
  6544.     - platform: modbus_controller
  6545.       modbus_controller_id: sprsun_pc
  6546.       name: ${friendly_name} ECO freq of heat R42
  6547.       address: 0x0135
  6548.       unit_of_measurement: "Hz"
  6549.       #icon: "mdi:fan-speed-1"
  6550.       id: eco_freq_of_heat_r42
  6551.       value_type: U_WORD
  6552.       min_value: 30
  6553.       max_value: 120
  6554.       #lambda: "return x * 0.5;"
  6555.       #write_lambda: "return x / 0.5;"
  6556.       step: 1
  6557.       mode: box
  6558.       entity_category: config
  6559.       skip_updates: 10
  6560.  
  6561.     - platform: modbus_controller
  6562.       modbus_controller_id: sprsun_pc
  6563.       name: ${friendly_name} ECO freq of heat R43
  6564.       address: 0x0136
  6565.       unit_of_measurement: "Hz"
  6566.       #icon: "mdi:fan-speed-1"
  6567.       id: eco_freq_of_heat_r43
  6568.       value_type: U_WORD
  6569.       min_value: 30
  6570.       max_value: 120
  6571.       #lambda: "return x * 0.5;"
  6572.       #write_lambda: "return x / 0.5;"
  6573.       step: 1
  6574.       mode: box
  6575.       entity_category: config
  6576.       skip_updates: 10
  6577.  
  6578.     - platform: modbus_controller
  6579.       modbus_controller_id: sprsun_pc
  6580.       name: ${friendly_name} ECO freq of heat R44
  6581.       address: 0x0137
  6582.       unit_of_measurement: "Hz"
  6583.       #icon: "mdi:fan-speed-1"
  6584.       id: eco_freq_of_heat_r44
  6585.       value_type: U_WORD
  6586.       min_value: 30
  6587.       max_value: 120
  6588.       #lambda: "return x * 0.5;"
  6589.       #write_lambda: "return x / 0.5;"
  6590.       step: 1
  6591.       mode: box
  6592.       entity_category: config
  6593.       skip_updates: 10
  6594.  
  6595.     - platform: modbus_controller
  6596.       modbus_controller_id: sprsun_pc
  6597.       name: ${friendly_name} ECO freq of heat R45
  6598.       address: 0x0138
  6599.       unit_of_measurement: "Hz"
  6600.       #icon: "mdi:fan-speed-1"
  6601.       id: eco_freq_of_heat_r45
  6602.       value_type: U_WORD
  6603.       min_value: 30
  6604.       max_value: 120
  6605.       #lambda: "return x * 0.5;"
  6606.       #write_lambda: "return x / 0.5;"
  6607.       step: 1
  6608.       mode: box
  6609.       entity_category: config
  6610.       skip_updates: 10
  6611.  
  6612.     - platform: modbus_controller
  6613.       modbus_controller_id: sprsun_pc
  6614.       name: ${friendly_name} ECO freq of heat R46
  6615.       address: 0x0139
  6616.       unit_of_measurement: "Hz"
  6617.       #icon: "mdi:fan-speed-1"
  6618.       id: eco_freq_of_heat_r46
  6619.       value_type: U_WORD
  6620.       min_value: 30
  6621.       max_value: 120
  6622.       #lambda: "return x * 0.5;"
  6623.       #write_lambda: "return x / 0.5;"
  6624.       step: 1
  6625.       mode: box
  6626.       entity_category: config
  6627.       skip_updates: 10
  6628.  
  6629.     - platform: modbus_controller
  6630.       modbus_controller_id: sprsun_pc
  6631.       name: ${friendly_name} ECO freq of heat R47
  6632.       address: 0x013A
  6633.       unit_of_measurement: "Hz"
  6634.       #icon: "mdi:fan-speed-1"
  6635.       id: eco_freq_of_heat_r47
  6636.       value_type: U_WORD
  6637.       min_value: 30
  6638.       max_value: 120
  6639.       #lambda: "return x * 0.5;"
  6640.       #write_lambda: "return x / 0.5;"
  6641.       step: 1
  6642.       mode: box
  6643.       entity_category: config
  6644.       skip_updates: 10
  6645.  
  6646.     - platform: modbus_controller
  6647.       modbus_controller_id: sprsun_pc
  6648.       name: ${friendly_name} ECO freq of heat R48
  6649.       address: 0x013B
  6650.       unit_of_measurement: "Hz"
  6651.       #icon: "mdi:fan-speed-1"
  6652.       id: eco_freq_of_heat_r48
  6653.       value_type: U_WORD
  6654.       min_value: 30
  6655.       max_value: 120
  6656.       #lambda: "return x * 0.5;"
  6657.       #write_lambda: "return x / 0.5;"
  6658.       step: 1
  6659.       mode: box
  6660.       entity_category: config
  6661.       skip_updates: 10
  6662.  
  6663.     - platform: modbus_controller
  6664.       modbus_controller_id: sprsun_pc
  6665.       name: ${friendly_name} ECO freq of heat R49
  6666.       address: 0x013C
  6667.       unit_of_measurement: "Hz"
  6668.       #icon: "mdi:fan-speed-1"
  6669.       id: eco_freq_of_heat_r49
  6670.       value_type: U_WORD
  6671.       min_value: 30
  6672.       max_value: 120
  6673.       #lambda: "return x * 0.5;"
  6674.       #write_lambda: "return x / 0.5;"
  6675.       step: 1
  6676.       mode: box
  6677.       entity_category: config
  6678.       skip_updates: 10
  6679.  
  6680.  
  6681. #################################################################
  6682.  
  6683. #Częstotliwość w trybie ECO dla chłodzenia
  6684.     - platform: modbus_controller
  6685.       modbus_controller_id: sprsun_pc
  6686.       name: ${friendly_name} ECO freq of cool R50
  6687.       address: 0x013D
  6688.       unit_of_measurement: "Hz"
  6689.       #icon: "mdi:fan-speed-1"
  6690.       id: eco_freq_of_cool_r50
  6691.       value_type: U_WORD
  6692.       min_value: 30
  6693.       max_value: 120
  6694.       #lambda: "return x * 0.5;"
  6695.       #write_lambda: "return x / 0.5;"
  6696.       step: 1
  6697.       mode: box
  6698.       entity_category: config
  6699.       skip_updates: 10
  6700.  
  6701.     - platform: modbus_controller
  6702.       modbus_controller_id: sprsun_pc
  6703.       name: ${friendly_name} ECO freq of cool R51
  6704.       address: 0x013E
  6705.       unit_of_measurement: "Hz"
  6706.       #icon: "mdi:fan-speed-1"
  6707.       id: eco_freq_of_cool_r51
  6708.       value_type: U_WORD
  6709.       min_value: 30
  6710.       max_value: 120
  6711.       #lambda: "return x * 0.5;"
  6712.       #write_lambda: "return x / 0.5;"
  6713.       step: 1
  6714.       mode: box
  6715.       entity_category: config
  6716.       skip_updates: 10
  6717.  
  6718.     - platform: modbus_controller
  6719.       modbus_controller_id: sprsun_pc
  6720.       name: ${friendly_name} ECO freq of cool R52
  6721.       address: 0x013F
  6722.       unit_of_measurement: "Hz"
  6723.       #icon: "mdi:fan-speed-1"
  6724.       id: eco_freq_of_cool_r52
  6725.       value_type: U_WORD
  6726.       min_value: 30
  6727.       max_value: 120
  6728.       #lambda: "return x * 0.5;"
  6729.       #write_lambda: "return x / 0.5;"
  6730.       step: 1
  6731.       mode: box
  6732.       entity_category: config
  6733.       skip_updates: 10
  6734.  
  6735.     - platform: modbus_controller
  6736.       modbus_controller_id: sprsun_pc
  6737.       name: ${friendly_name} ECO freq of cool R53
  6738.       address: 0x0140
  6739.       unit_of_measurement: "Hz"
  6740.       #icon: "mdi:fan-speed-1"
  6741.       id: eco_freq_of_cool_r53
  6742.       value_type: U_WORD
  6743.       min_value: 30
  6744.       max_value: 120
  6745.       #lambda: "return x * 0.5;"
  6746.       #write_lambda: "return x / 0.5;"
  6747.       step: 1
  6748.       mode: box
  6749.       entity_category: config
  6750.       skip_updates: 10
  6751.  
  6752. #################################################################
  6753.  
  6754. #Częstotliwość w trybie nocnym dla CWU
  6755.     - platform: modbus_controller
  6756.       modbus_controller_id: sprsun_pc
  6757.       name: ${friendly_name} Night freq of water R54
  6758.       address: 0x0141
  6759.       unit_of_measurement: "Hz"
  6760.       #icon: "mdi:fan-speed-1"
  6761.       id: night_freq_of_water_r54
  6762.       value_type: U_WORD
  6763.       min_value: 30
  6764.       max_value: 120
  6765.       #lambda: "return x * 0.5;"
  6766.       #write_lambda: "return x / 0.5;"
  6767.       step: 1
  6768.       mode: box
  6769.       entity_category: config
  6770.       skip_updates: 10
  6771.  
  6772.     - platform: modbus_controller
  6773.       modbus_controller_id: sprsun_pc
  6774.       name: ${friendly_name} Night freq of water R55
  6775.       address: 0x0142
  6776.       unit_of_measurement: "Hz"
  6777.       #icon: "mdi:fan-speed-1"
  6778.       id: night_freq_of_water_r55
  6779.       value_type: U_WORD
  6780.       min_value: 30
  6781.       max_value: 120
  6782.       #lambda: "return x * 0.5;"
  6783.       #write_lambda: "return x / 0.5;"
  6784.       step: 1
  6785.       mode: box
  6786.       entity_category: config
  6787.       skip_updates: 10
  6788.  
  6789.     - platform: modbus_controller
  6790.       modbus_controller_id: sprsun_pc
  6791.       name: ${friendly_name} Night freq of water R56
  6792.       address: 0x0143
  6793.       unit_of_measurement: "Hz"
  6794.       #icon: "mdi:fan-speed-1"
  6795.       id: night_freq_of_water_r56
  6796.       value_type: U_WORD
  6797.       min_value: 30
  6798.       max_value: 120
  6799.       #lambda: "return x * 0.5;"
  6800.       #write_lambda: "return x / 0.5;"
  6801.       step: 1
  6802.       mode: box
  6803.       entity_category: config
  6804.       skip_updates: 10
  6805.  
  6806.     - platform: modbus_controller
  6807.       modbus_controller_id: sprsun_pc
  6808.       name: ${friendly_name} Night freq of water R57
  6809.       address: 0x0144
  6810.       unit_of_measurement: "Hz"
  6811.       #icon: "mdi:fan-speed-1"
  6812.       id: night_freq_of_water_r57
  6813.       value_type: U_WORD
  6814.       min_value: 30
  6815.       max_value: 120
  6816.       #lambda: "return x * 0.5;"
  6817.       #write_lambda: "return x / 0.5;"
  6818.       step: 1
  6819.       mode: box
  6820.       entity_category: config
  6821.       skip_updates: 10
  6822.  
  6823.     - platform: modbus_controller
  6824.       modbus_controller_id: sprsun_pc
  6825.       name: ${friendly_name} Night freq of water R58
  6826.       address: 0x0145
  6827.       unit_of_measurement: "Hz"
  6828.       #icon: "mdi:fan-speed-1"
  6829.       id: night_freq_of_water_r58
  6830.       value_type: U_WORD
  6831.       min_value: 30
  6832.       max_value: 120
  6833.       #lambda: "return x * 0.5;"
  6834.       #write_lambda: "return x / 0.5;"
  6835.       step: 1
  6836.       mode: box
  6837.       entity_category: config
  6838.       skip_updates: 10
  6839.  
  6840.     - platform: modbus_controller
  6841.       modbus_controller_id: sprsun_pc
  6842.       name: ${friendly_name} Night freq of water R59
  6843.       address: 0x0146
  6844.       unit_of_measurement: "Hz"
  6845.       #icon: "mdi:fan-speed-1"
  6846.       id: night_freq_of_water_r59
  6847.       value_type: U_WORD
  6848.       min_value: 30
  6849.       max_value: 120
  6850.       #lambda: "return x * 0.5;"
  6851.       #write_lambda: "return x / 0.5;"
  6852.       step: 1
  6853.       mode: box
  6854.       entity_category: config
  6855.       skip_updates: 10
  6856.  
  6857.     - platform: modbus_controller
  6858.       modbus_controller_id: sprsun_pc
  6859.       name: ${friendly_name} Night freq of water R60
  6860.       address: 0x0147
  6861.       unit_of_measurement: "Hz"
  6862.       #icon: "mdi:fan-speed-1"
  6863.       id: night_freq_of_water_r60
  6864.       value_type: U_WORD
  6865.       min_value: 30
  6866.       max_value: 120
  6867.       #lambda: "return x * 0.5;"
  6868.       #write_lambda: "return x / 0.5;"
  6869.       step: 1
  6870.       mode: box
  6871.       entity_category: config
  6872.       skip_updates: 10
  6873.  
  6874.     - platform: modbus_controller
  6875.       modbus_controller_id: sprsun_pc
  6876.       name: ${friendly_name} Night freq of water R61
  6877.       address: 0x0148
  6878.       unit_of_measurement: "Hz"
  6879.       #icon: "mdi:fan-speed-1"
  6880.       id: night_freq_of_water_r61
  6881.       value_type: U_WORD
  6882.       min_value: 30
  6883.       max_value: 120
  6884.       #lambda: "return x * 0.5;"
  6885.       #write_lambda: "return x / 0.5;"
  6886.       step: 1
  6887.       mode: box
  6888.       entity_category: config
  6889.       skip_updates: 10
  6890.  
  6891. #################################################################
  6892.  
  6893. #Częstotliwość w trybie nocnym dla CO
  6894.     - platform: modbus_controller
  6895.       modbus_controller_id: sprsun_pc
  6896.       name: ${friendly_name} Night freq of heat R62
  6897.       address: 0x0149
  6898.       unit_of_measurement: "Hz"
  6899.       #icon: "mdi:fan-speed-1"
  6900.       id: night_freq_of_heat_r62
  6901.       value_type: U_WORD
  6902.       min_value: 30
  6903.       max_value: 120
  6904.       #lambda: "return x * 0.5;"
  6905.       #write_lambda: "return x / 0.5;"
  6906.       step: 1
  6907.       mode: box
  6908.       entity_category: config
  6909.       skip_updates: 10
  6910.  
  6911.     - platform: modbus_controller
  6912.       modbus_controller_id: sprsun_pc
  6913.       name: ${friendly_name} Night freq of heat R63
  6914.       address: 0x014A
  6915.       unit_of_measurement: "Hz"
  6916.       #icon: "mdi:fan-speed-1"
  6917.       id: night_freq_of_heat_r63
  6918.       value_type: U_WORD
  6919.       min_value: 30
  6920.       max_value: 120
  6921.       #lambda: "return x * 0.5;"
  6922.       #write_lambda: "return x / 0.5;"
  6923.       step: 1
  6924.       mode: box
  6925.       entity_category: config
  6926.       skip_updates: 10
  6927.  
  6928.     - platform: modbus_controller
  6929.       modbus_controller_id: sprsun_pc
  6930.       name: ${friendly_name} Night freq of heat R64
  6931.       address: 0x014B
  6932.       unit_of_measurement: "Hz"
  6933.       #icon: "mdi:fan-speed-1"
  6934.       id: night_freq_of_heat_r64
  6935.       value_type: U_WORD
  6936.       min_value: 30
  6937.       max_value: 120
  6938.       #lambda: "return x * 0.5;"
  6939.       #write_lambda: "return x / 0.5;"
  6940.       step: 1
  6941.       mode: box
  6942.       entity_category: config
  6943.       skip_updates: 10
  6944.  
  6945.     - platform: modbus_controller
  6946.       modbus_controller_id: sprsun_pc
  6947.       name: ${friendly_name} Night freq of heat R65
  6948.       address: 0x014C
  6949.       unit_of_measurement: "Hz"
  6950.       #icon: "mdi:fan-speed-1"
  6951.       id: night_freq_of_heat_r65
  6952.       value_type: U_WORD
  6953.       min_value: 30
  6954.       max_value: 120
  6955.       #lambda: "return x * 0.5;"
  6956.       #write_lambda: "return x / 0.5;"
  6957.       step: 1
  6958.       mode: box
  6959.       entity_category: config
  6960.       skip_updates: 10
  6961.  
  6962.     - platform: modbus_controller
  6963.       modbus_controller_id: sprsun_pc
  6964.       name: ${friendly_name} Night freq of heat R66
  6965.       address: 0x014D
  6966.       unit_of_measurement: "Hz"
  6967.       #icon: "mdi:fan-speed-1"
  6968.       id: night_freq_of_heat_r66
  6969.       value_type: U_WORD
  6970.       min_value: 30
  6971.       max_value: 120
  6972.       #lambda: "return x * 0.5;"
  6973.       #write_lambda: "return x / 0.5;"
  6974.       step: 1
  6975.       mode: box
  6976.       entity_category: config
  6977.       skip_updates: 10
  6978.  
  6979.     - platform: modbus_controller
  6980.       modbus_controller_id: sprsun_pc
  6981.       name: ${friendly_name} Night freq of heat R67
  6982.       address: 0x014E
  6983.       unit_of_measurement: "Hz"
  6984.       #icon: "mdi:fan-speed-1"
  6985.       id: night_freq_of_heat_r67
  6986.       value_type: U_WORD
  6987.       min_value: 30
  6988.       max_value: 120
  6989.       #lambda: "return x * 0.5;"
  6990.       #write_lambda: "return x / 0.5;"
  6991.       step: 1
  6992.       mode: box
  6993.       entity_category: config
  6994.       skip_updates: 10
  6995.  
  6996.     - platform: modbus_controller
  6997.       modbus_controller_id: sprsun_pc
  6998.       name: ${friendly_name} Night freq of heat R68
  6999.       address: 0x014F
  7000.       unit_of_measurement: "Hz"
  7001.       #icon: "mdi:fan-speed-1"
  7002.       id: night_freq_of_heat_r68
  7003.       value_type: U_WORD
  7004.       min_value: 30
  7005.       max_value: 120
  7006.       #lambda: "return x * 0.5;"
  7007.       #write_lambda: "return x / 0.5;"
  7008.       step: 1
  7009.       mode: box
  7010.       entity_category: config
  7011.       skip_updates: 10
  7012.  
  7013.     - platform: modbus_controller
  7014.       modbus_controller_id: sprsun_pc
  7015.       name: ${friendly_name} Night freq of heat R69
  7016.       address: 0x0150
  7017.       unit_of_measurement: "Hz"
  7018.       #icon: "mdi:fan-speed-1"
  7019.       id: night_freq_of_heat_r69
  7020.       value_type: U_WORD
  7021.       min_value: 30
  7022.       max_value: 120
  7023.       #lambda: "return x * 0.5;"
  7024.       #write_lambda: "return x / 0.5;"
  7025.       step: 1
  7026.       mode: box
  7027.       entity_category: config
  7028.       skip_updates: 10
  7029.  
  7030. #################################################################
  7031.  
  7032. #Częstotliwość w trybie nocnym dla chłodzenia
  7033.     - platform: modbus_controller
  7034.       modbus_controller_id: sprsun_pc
  7035.       name: ${friendly_name} Night freq of cool R70
  7036.       address: 0x0151
  7037.       unit_of_measurement: "Hz"
  7038.       #icon: "mdi:fan-speed-1"
  7039.       id: night_freq_of_cool_r70
  7040.       value_type: U_WORD
  7041.       min_value: 30
  7042.       max_value: 120
  7043.       #lambda: "return x * 0.5;"
  7044.       #write_lambda: "return x / 0.5;"
  7045.       step: 1
  7046.       mode: box
  7047.       entity_category: config
  7048.       skip_updates: 10
  7049.  
  7050.     - platform: modbus_controller
  7051.       modbus_controller_id: sprsun_pc
  7052.       name: ${friendly_name} Night freq of cool R71
  7053.       address: 0x0152
  7054.       unit_of_measurement: "Hz"
  7055.       #icon: "mdi:fan-speed-1"
  7056.       id: night_freq_of_cool_r71
  7057.       value_type: U_WORD
  7058.       min_value: 30
  7059.       max_value: 120
  7060.       #lambda: "return x * 0.5;"
  7061.       #write_lambda: "return x / 0.5;"
  7062.       step: 1
  7063.       mode: box
  7064.       entity_category: config
  7065.       skip_updates: 10
  7066.  
  7067.     - platform: modbus_controller
  7068.       modbus_controller_id: sprsun_pc
  7069.       name: ${friendly_name} Night freq of cool R72
  7070.       address: 0x0153
  7071.       unit_of_measurement: "Hz"
  7072.       #icon: "mdi:fan-speed-1"
  7073.       id: night_freq_of_cool_r72
  7074.       value_type: U_WORD
  7075.       min_value: 30
  7076.       max_value: 120
  7077.       #lambda: "return x * 0.5;"
  7078.       #write_lambda: "return x / 0.5;"
  7079.       step: 1
  7080.       mode: box
  7081.       entity_category: config
  7082.       skip_updates: 10
  7083.  
  7084.     - platform: modbus_controller
  7085.       modbus_controller_id: sprsun_pc
  7086.       name: ${friendly_name} Night freq of cool R73
  7087.       address: 0x0154
  7088.       unit_of_measurement: "Hz"
  7089.       #icon: "mdi:fan-speed-1"
  7090.       id: night_freq_of_cool_r73
  7091.       value_type: U_WORD
  7092.       min_value: 30
  7093.       max_value: 120
  7094.       #lambda: "return x * 0.5;"
  7095.       #write_lambda: "return x / 0.5;"
  7096.       step: 1
  7097.       mode: box
  7098.       entity_category: config
  7099.       skip_updates: 10
  7100.  
  7101. #################################################################
  7102.  
  7103. #Częstotliwość w trybie testowym dla CWU
  7104.     - platform: modbus_controller
  7105.       modbus_controller_id: sprsun_pc
  7106.       name: ${friendly_name} Test freq of water R74
  7107.       address: 0x0155
  7108.       unit_of_measurement: "Hz"
  7109.       #icon: "mdi:fan-speed-1"
  7110.       id: test_freq_of_water_r74
  7111.       value_type: U_WORD
  7112.       min_value: 30
  7113.       max_value: 120
  7114.       #lambda: "return x * 0.5;"
  7115.       #write_lambda: "return x / 0.5;"
  7116.       step: 1
  7117.       mode: box
  7118.       entity_category: config
  7119.       skip_updates: 10
  7120.  
  7121.     - platform: modbus_controller
  7122.       modbus_controller_id: sprsun_pc
  7123.       name: ${friendly_name} Test freq of water R75
  7124.       address: 0x0156
  7125.       unit_of_measurement: "Hz"
  7126.       #icon: "mdi:fan-speed-1"
  7127.       id: test_freq_of_water_r75
  7128.       value_type: U_WORD
  7129.       min_value: 30
  7130.       max_value: 120
  7131.       #lambda: "return x * 0.5;"
  7132.       #write_lambda: "return x / 0.5;"
  7133.       step: 1
  7134.       mode: box
  7135.       entity_category: config
  7136.       skip_updates: 10
  7137.  
  7138.     - platform: modbus_controller
  7139.       modbus_controller_id: sprsun_pc
  7140.       name: ${friendly_name} Test freq of water R76
  7141.       address: 0x0157
  7142.       unit_of_measurement: "Hz"
  7143.       #icon: "mdi:fan-speed-1"
  7144.       id: test_freq_of_water_r76
  7145.       value_type: U_WORD
  7146.       min_value: 30
  7147.       max_value: 120
  7148.       #lambda: "return x * 0.5;"
  7149.       #write_lambda: "return x / 0.5;"
  7150.       step: 1
  7151.       mode: box
  7152.       entity_category: config
  7153.       skip_updates: 10
  7154.  
  7155.     - platform: modbus_controller
  7156.       modbus_controller_id: sprsun_pc
  7157.       name: ${friendly_name} Test freq of water R77
  7158.       address: 0x0158
  7159.       unit_of_measurement: "Hz"
  7160.       #icon: "mdi:fan-speed-1"
  7161.       id: test_freq_of_water_r77
  7162.       value_type: U_WORD
  7163.       min_value: 30
  7164.       max_value: 120
  7165.       #lambda: "return x * 0.5;"
  7166.       #write_lambda: "return x / 0.5;"
  7167.       step: 1
  7168.       mode: box
  7169.       entity_category: config
  7170.       skip_updates: 10
  7171.  
  7172.     - platform: modbus_controller
  7173.       modbus_controller_id: sprsun_pc
  7174.       name: ${friendly_name} Test freq of water R78
  7175.       address: 0x0159
  7176.       unit_of_measurement: "Hz"
  7177.       #icon: "mdi:fan-speed-1"
  7178.       id: test_freq_of_water_r78
  7179.       value_type: U_WORD
  7180.       min_value: 30
  7181.       max_value: 120
  7182.       #lambda: "return x * 0.5;"
  7183.       #write_lambda: "return x / 0.5;"
  7184.       step: 1
  7185.       mode: box
  7186.       entity_category: config
  7187.       skip_updates: 10
  7188.  
  7189.     - platform: modbus_controller
  7190.       modbus_controller_id: sprsun_pc
  7191.       name: ${friendly_name} Test freq of water R79
  7192.       address: 0x015A
  7193.       unit_of_measurement: "Hz"
  7194.       #icon: "mdi:fan-speed-1"
  7195.       id: test_freq_of_water_r79
  7196.       value_type: U_WORD
  7197.       min_value: 30
  7198.       max_value: 120
  7199.       #lambda: "return x * 0.5;"
  7200.       #write_lambda: "return x / 0.5;"
  7201.       step: 1
  7202.       mode: box
  7203.       entity_category: config
  7204.       skip_updates: 10
  7205.  
  7206.     - platform: modbus_controller
  7207.       modbus_controller_id: sprsun_pc
  7208.       name: ${friendly_name} Test freq of water R80
  7209.       address: 0x015B
  7210.       unit_of_measurement: "Hz"
  7211.       #icon: "mdi:fan-speed-1"
  7212.       id: test_freq_of_water_r80
  7213.       value_type: U_WORD
  7214.       min_value: 30
  7215.       max_value: 120
  7216.       #lambda: "return x * 0.5;"
  7217.       #write_lambda: "return x / 0.5;"
  7218.       step: 1
  7219.       mode: box
  7220.       entity_category: config
  7221.       skip_updates: 10
  7222.  
  7223.     - platform: modbus_controller
  7224.       modbus_controller_id: sprsun_pc
  7225.       name: ${friendly_name} Test freq of water R81
  7226.       address: 0x015C
  7227.       unit_of_measurement: "Hz"
  7228.       #icon: "mdi:fan-speed-1"
  7229.       id: test_freq_of_water_r81
  7230.       value_type: U_WORD
  7231.       min_value: 30
  7232.       max_value: 120
  7233.       #lambda: "return x * 0.5;"
  7234.       #write_lambda: "return x / 0.5;"
  7235.       step: 1
  7236.       mode: box
  7237.       entity_category: config
  7238.       skip_updates: 10
  7239.  
  7240. #################################################################
  7241.  
  7242. #Częstotliwość w trybie testowym dla CO
  7243.     - platform: modbus_controller
  7244.       modbus_controller_id: sprsun_pc
  7245.       name: ${friendly_name} Test freq of heat R82
  7246.       address: 0x015D
  7247.       unit_of_measurement: "Hz"
  7248.       #icon: "mdi:fan-speed-1"
  7249.       id: test_freq_of_heat_r82
  7250.       value_type: U_WORD
  7251.       min_value: 30
  7252.       max_value: 120
  7253.       #lambda: "return x * 0.5;"
  7254.       #write_lambda: "return x / 0.5;"
  7255.       step: 1
  7256.       mode: box
  7257.       entity_category: config
  7258.       skip_updates: 10
  7259.  
  7260.     - platform: modbus_controller
  7261.       modbus_controller_id: sprsun_pc
  7262.       name: ${friendly_name} Test freq of heat R83
  7263.       address: 0x015E
  7264.       unit_of_measurement: "Hz"
  7265.       #icon: "mdi:fan-speed-1"
  7266.       id: test_freq_of_heat_r83
  7267.       value_type: U_WORD
  7268.       min_value: 30
  7269.       max_value: 120
  7270.       #lambda: "return x * 0.5;"
  7271.       #write_lambda: "return x / 0.5;"
  7272.       step: 1
  7273.       mode: box
  7274.       entity_category: config
  7275.       skip_updates: 10
  7276.  
  7277.     - platform: modbus_controller
  7278.       modbus_controller_id: sprsun_pc
  7279.       name: ${friendly_name} Test freq of heat R84
  7280.       address: 0x015F
  7281.       unit_of_measurement: "Hz"
  7282.       #icon: "mdi:fan-speed-1"
  7283.       id: test_freq_of_heat_r84
  7284.       value_type: U_WORD
  7285.       min_value: 30
  7286.       max_value: 120
  7287.       #lambda: "return x * 0.5;"
  7288.       #write_lambda: "return x / 0.5;"
  7289.       step: 1
  7290.       mode: box
  7291.       entity_category: config
  7292.       skip_updates: 10
  7293.  
  7294.     - platform: modbus_controller
  7295.       modbus_controller_id: sprsun_pc
  7296.       name: ${friendly_name} Test freq of heat R85
  7297.       address: 0x0160
  7298.       unit_of_measurement: "Hz"
  7299.       #icon: "mdi:fan-speed-1"
  7300.       id: test_freq_of_heat_r85
  7301.       value_type: U_WORD
  7302.       min_value: 30
  7303.       max_value: 120
  7304.       #lambda: "return x * 0.5;"
  7305.       #write_lambda: "return x / 0.5;"
  7306.       step: 1
  7307.       mode: box
  7308.       entity_category: config
  7309.       skip_updates: 10
  7310.  
  7311.     - platform: modbus_controller
  7312.       modbus_controller_id: sprsun_pc
  7313.       name: ${friendly_name} Test freq of heat R86
  7314.       address: 0x0161
  7315.       unit_of_measurement: "Hz"
  7316.       #icon: "mdi:fan-speed-1"
  7317.       id: test_freq_of_heat_r86
  7318.       value_type: U_WORD
  7319.       min_value: 30
  7320.       max_value: 120
  7321.       #lambda: "return x * 0.5;"
  7322.       #write_lambda: "return x / 0.5;"
  7323.       step: 1
  7324.       mode: box
  7325.       entity_category: config
  7326.       skip_updates: 10
  7327.  
  7328.     - platform: modbus_controller
  7329.       modbus_controller_id: sprsun_pc
  7330.       name: ${friendly_name} Test freq of heat R87
  7331.       address: 0x0162
  7332.       unit_of_measurement: "Hz"
  7333.       #icon: "mdi:fan-speed-1"
  7334.       id: test_freq_of_heat_r87
  7335.       value_type: U_WORD
  7336.       min_value: 30
  7337.       max_value: 120
  7338.       #lambda: "return x * 0.5;"
  7339.       #write_lambda: "return x / 0.5;"
  7340.       step: 1
  7341.       mode: box
  7342.       entity_category: config
  7343.       skip_updates: 10
  7344.  
  7345.     - platform: modbus_controller
  7346.       modbus_controller_id: sprsun_pc
  7347.       name: ${friendly_name} Test freq of heat R88
  7348.       address: 0x0163
  7349.       unit_of_measurement: "Hz"
  7350.       #icon: "mdi:fan-speed-1"
  7351.       id: test_freq_of_heat_r88
  7352.       value_type: U_WORD
  7353.       min_value: 30
  7354.       max_value: 120
  7355.       #lambda: "return x * 0.5;"
  7356.       #write_lambda: "return x / 0.5;"
  7357.       step: 1
  7358.       mode: box
  7359.       entity_category: config
  7360.       skip_updates: 10
  7361.  
  7362.     - platform: modbus_controller
  7363.       modbus_controller_id: sprsun_pc
  7364.       name: ${friendly_name} Test freq of heat R89
  7365.       address: 0x0164
  7366.       unit_of_measurement: "Hz"
  7367.       #icon: "mdi:fan-speed-1"
  7368.       id: test_freq_of_heat_r89
  7369.       value_type: U_WORD
  7370.       min_value: 30
  7371.       max_value: 120
  7372.       #lambda: "return x * 0.5;"
  7373.       #write_lambda: "return x / 0.5;"
  7374.       step: 1
  7375.       mode: box
  7376.       entity_category: config
  7377.       skip_updates: 10
  7378.  
  7379. #################################################################
  7380.  
  7381. #Częstotliwość w trybie testowym dla chłodzenia
  7382.     # - platform: modbus_controller
  7383.     #   modbus_controller_id: sprsun_pc
  7384.     #   name: ${friendly_name} Test freq of cool R90
  7385.     #   address: 0x0165
  7386.     #   unit_of_measurement: "Hz"
  7387.     #   #icon: "mdi:fan-speed-1"
  7388.     #   id: test_freq_of_cool_r90
  7389.     #   value_type: U_WORD
  7390.     #   min_value: 30
  7391.     #   max_value: 120
  7392.     #   #lambda: "return x * 0.5;"
  7393.     #   #write_lambda: "return x / 0.5;"
  7394.     #   step: 1
  7395.     #   mode: box
  7396.     #   entity_category: config
  7397.     #   skip_updates: 10
  7398.  
  7399.     # - platform: modbus_controller
  7400.     #   modbus_controller_id: sprsun_pc
  7401.     #   name: ${friendly_name} Test freq of cool R91
  7402.     #   address: 0x0166
  7403.     #   unit_of_measurement: "Hz"
  7404.     #   #icon: "mdi:fan-speed-1"
  7405.     #   id: test_freq_of_cool_r91
  7406.     #   value_type: U_WORD
  7407.     #   min_value: 30
  7408.     #   max_value: 120
  7409.     #   #lambda: "return x * 0.5;"
  7410.     #   #write_lambda: "return x / 0.5;"
  7411.     #   step: 1
  7412.     #   mode: box
  7413.     #   entity_category: config
  7414.     #   skip_updates: 10
  7415.  
  7416.     # - platform: modbus_controller
  7417.     #   modbus_controller_id: sprsun_pc
  7418.     #   name: ${friendly_name} Test freq of cool R92
  7419.     #   address: 0x0167
  7420.     #   unit_of_measurement: "Hz"
  7421.     #   #icon: "mdi:fan-speed-1"
  7422.     #   id: test_freq_of_cool_r92
  7423.     #   value_type: U_WORD
  7424.     #   min_value: 30
  7425.     #   max_value: 120
  7426.     #   #lambda: "return x * 0.5;"
  7427.     #   #write_lambda: "return x / 0.5;"
  7428.     #   step: 1
  7429.     #   mode: box
  7430.     #   entity_category: config
  7431.     #   skip_updates: 10
  7432.  
  7433.     # - platform: modbus_controller
  7434.     #   modbus_controller_id: sprsun_pc
  7435.     #   name: ${friendly_name} Test freq of cool R93
  7436.     #   address: 0x0168
  7437.     #   unit_of_measurement: "Hz"
  7438.     #   #icon: "mdi:fan-speed-1"
  7439.     #   id: test_freq_of_cool_r93
  7440.     #   value_type: U_WORD
  7441.     #   min_value: 30
  7442.     #   max_value: 120
  7443.     #   #lambda: "return x * 0.5;"
  7444.     #   #write_lambda: "return x / 0.5;"
  7445.     #   step: 1
  7446.     #   mode: box
  7447.     #   entity_category: config
  7448.     #   skip_updates: 10
  7449.  
  7450. #################################################################
  7451.  
  7452. #Temperatura zewnętrzna w trybie ECO dla CO
  7453.     - platform: modbus_controller
  7454.       modbus_controller_id: sprsun_pc
  7455.       name: ${friendly_name} E01 Economic heat ambi 1
  7456.       address: 0x0169
  7457.       unit_of_measurement: "°C"
  7458.       #icon: "mdi:fan-speed-1"
  7459.       id: e01_economic_heat_ambi_1
  7460.       value_type: S_WORD
  7461.       min_value: -30
  7462.       max_value: 50
  7463.       #lambda: "return x * 0.5;"
  7464.       #write_lambda: "return x / 0.5;"
  7465.       step: 1
  7466.       mode: box
  7467.       entity_category: config
  7468.       skip_updates: 10
  7469.  
  7470.     - platform: modbus_controller
  7471.       modbus_controller_id: sprsun_pc
  7472.       name: ${friendly_name} E02 Economic heat ambi 2
  7473.       address: 0x016A
  7474.       unit_of_measurement: "°C"
  7475.       #icon: "mdi:fan-speed-1"
  7476.       id: e02_economic_heat_ambi_2
  7477.       value_type: S_WORD
  7478.       min_value: -30
  7479.       max_value: 50
  7480.       #lambda: "return x * 0.5;"
  7481.       #write_lambda: "return x / 0.5;"
  7482.       step: 1
  7483.       mode: box
  7484.       entity_category: config
  7485.       skip_updates: 10
  7486.  
  7487.     - platform: modbus_controller
  7488.       modbus_controller_id: sprsun_pc
  7489.       name: ${friendly_name} E03 Economic heat ambi 3
  7490.       address: 0x016B
  7491.       unit_of_measurement: "°C"
  7492.       #icon: "mdi:fan-speed-1"
  7493.       id: e03_economic_heat_ambi_3
  7494.       value_type: S_WORD
  7495.       min_value: -30
  7496.       max_value: 50
  7497.       #lambda: "return x * 0.5;"
  7498.       #write_lambda: "return x / 0.5;"
  7499.       step: 1
  7500.       mode: box
  7501.       entity_category: config
  7502.       skip_updates: 10
  7503.  
  7504.     - platform: modbus_controller
  7505.       modbus_controller_id: sprsun_pc
  7506.       name: ${friendly_name} E04 Economic heat ambi 4
  7507.       address: 0x016C
  7508.       unit_of_measurement: "°C"
  7509.       #icon: "mdi:fan-speed-1"
  7510.       id: e04_economic_heat_ambi_4
  7511.       value_type: S_WORD
  7512.       min_value: -30
  7513.       max_value: 50
  7514.       #lambda: "return x * 0.5;"
  7515.       #write_lambda: "return x / 0.5;"
  7516.       step: 1
  7517.       mode: box
  7518.       entity_category: config
  7519.       skip_updates: 10
  7520.  
  7521. #################################################################
  7522.  
  7523. #Temperatura zewnętrzna w trybie ECO dla CWU
  7524.     - platform: modbus_controller
  7525.       modbus_controller_id: sprsun_pc
  7526.       name: ${friendly_name} E05 Economic water ambi 1
  7527.       address: 0x016D
  7528.       unit_of_measurement: "°C"
  7529.       #icon: "mdi:fan-speed-1"
  7530.       id: e05_economic_water_ambi_1
  7531.       value_type: S_WORD
  7532.       min_value: -30
  7533.       max_value: 50
  7534.       #lambda: "return x * 0.5;"
  7535.       #write_lambda: "return x / 0.5;"
  7536.       step: 1
  7537.       mode: box
  7538.       entity_category: config
  7539.       skip_updates: 10
  7540.  
  7541.     - platform: modbus_controller
  7542.       modbus_controller_id: sprsun_pc
  7543.       name: ${friendly_name} E06 Economic water ambi 2
  7544.       address: 0x016E
  7545.       unit_of_measurement: "°C"
  7546.       #icon: "mdi:fan-speed-1"
  7547.       id: e06_economic_water_ambi_2
  7548.       value_type: S_WORD
  7549.       min_value: -30
  7550.       max_value: 50
  7551.       #lambda: "return x * 0.5;"
  7552.       #write_lambda: "return x / 0.5;"
  7553.       step: 1
  7554.       mode: box
  7555.       entity_category: config
  7556.       skip_updates: 10
  7557.  
  7558.     - platform: modbus_controller
  7559.       modbus_controller_id: sprsun_pc
  7560.       name: ${friendly_name} E07 Economic water ambi 3
  7561.       address: 0x016F
  7562.       unit_of_measurement: "°C"
  7563.       #icon: "mdi:fan-speed-1"
  7564.       id: e07_economic_water_ambi_3
  7565.       value_type: S_WORD
  7566.       min_value: -30
  7567.       max_value: 50
  7568.       #lambda: "return x * 0.5;"
  7569.       #write_lambda: "return x / 0.5;"
  7570.       step: 1
  7571.       mode: box
  7572.       entity_category: config
  7573.       skip_updates: 10
  7574.  
  7575.     - platform: modbus_controller
  7576.       modbus_controller_id: sprsun_pc
  7577.       name: ${friendly_name} E08 Economic water ambi 4
  7578.       address: 0x0170
  7579.       unit_of_measurement: "°C"
  7580.       #icon: "mdi:fan-speed-1"
  7581.       id: e08_economic_water_ambi_4
  7582.       value_type: S_WORD
  7583.       min_value: -30
  7584.       max_value: 50
  7585.       #lambda: "return x * 0.5;"
  7586.       #write_lambda: "return x / 0.5;"
  7587.       step: 1
  7588.       mode: box
  7589.       entity_category: config
  7590.       skip_updates: 10
  7591.  
  7592. #################################################################
  7593.  
  7594. #Temperatura zewnętrzna w trybie ECO dla chłodzenia
  7595.     - platform: modbus_controller
  7596.       modbus_controller_id: sprsun_pc
  7597.       name: ${friendly_name} E09 Economic cool ambi 1
  7598.       address: 0x0171
  7599.       unit_of_measurement: "°C"
  7600.       #icon: "mdi:fan-speed-1"
  7601.       id: e09_economic_cool_ambi_1
  7602.       value_type: S_WORD
  7603.       min_value: -30
  7604.       max_value: 50
  7605.       #lambda: "return x * 0.5;"
  7606.       #write_lambda: "return x / 0.5;"
  7607.       step: 1
  7608.       mode: box
  7609.       entity_category: config
  7610.       skip_updates: 10
  7611.  
  7612.     - platform: modbus_controller
  7613.       modbus_controller_id: sprsun_pc
  7614.       name: ${friendly_name} E10 Economic cool ambi 2
  7615.       address: 0x0172
  7616.       unit_of_measurement: "°C"
  7617.       #icon: "mdi:fan-speed-1"
  7618.       id: e10_economic_cool_ambi_2
  7619.       value_type: S_WORD
  7620.       min_value: -30
  7621.       max_value: 50
  7622.       #lambda: "return x * 0.5;"
  7623.       #write_lambda: "return x / 0.5;"
  7624.       step: 1
  7625.       mode: box
  7626.       entity_category: config
  7627.       skip_updates: 10
  7628.  
  7629.     - platform: modbus_controller
  7630.       modbus_controller_id: sprsun_pc
  7631.       name: ${friendly_name} E11 Economic cool ambi 3
  7632.       address: 0x0173
  7633.       unit_of_measurement: "°C"
  7634.       #icon: "mdi:fan-speed-1"
  7635.       id: e11_economic_cool_ambi_3
  7636.       value_type: S_WORD
  7637.       min_value: -30
  7638.       max_value: 50
  7639.       #lambda: "return x * 0.5;"
  7640.       #write_lambda: "return x / 0.5;"
  7641.       step: 1
  7642.       mode: box
  7643.       entity_category: config
  7644.       skip_updates: 10
  7645.  
  7646.     - platform: modbus_controller
  7647.       modbus_controller_id: sprsun_pc
  7648.       name: ${friendly_name} E12 Economic cool ambi 4
  7649.       address: 0x0174
  7650.       unit_of_measurement: "°C"
  7651.       #icon: "mdi:fan-speed-1"
  7652.       id: e12_economic_cool_ambi_4
  7653.       value_type: S_WORD
  7654.       min_value: -30
  7655.       max_value: 50
  7656.       #lambda: "return x * 0.5;"
  7657.       #write_lambda: "return x / 0.5;"
  7658.       step: 1
  7659.       mode: box
  7660.       entity_category: config
  7661.       skip_updates: 10
  7662.  
  7663. #################################################################
  7664.  
  7665. #Temperatura w trybie ECO dla CO
  7666.     - platform: modbus_controller
  7667.       modbus_controller_id: sprsun_pc
  7668.       name: ${friendly_name} E13 Economic heat temp 1
  7669.       address: 0x0175
  7670.       unit_of_measurement: "°C"
  7671.       #icon: "mdi:fan-speed-1"
  7672.       id: e13_economic_heat_temp_1
  7673.       value_type: U_WORD
  7674.       min_value: 10
  7675.       max_value: 55
  7676.       lambda: "return x * 0.5;"
  7677.       write_lambda: "return x / 0.5;"
  7678.       step: 1
  7679.       mode: box
  7680.       entity_category: config
  7681.       skip_updates: 10
  7682.       #(Read only lower 8 bits)
  7683.       bitmask: 0x00FF
  7684.  
  7685.     - platform: modbus_controller
  7686.       modbus_controller_id: sprsun_pc
  7687.       name: ${friendly_name} E14 Economic heat temp 2
  7688.       address: 0x0176
  7689.       unit_of_measurement: "°C"
  7690.       #icon: "mdi:fan-speed-1"
  7691.       id: e14_economic_heat_temp_2
  7692.       value_type: U_WORD
  7693.       min_value: 10
  7694.       max_value: 55
  7695.       lambda: "return x * 0.5;"
  7696.       write_lambda: "return x / 0.5;"
  7697.       step: 1
  7698.       mode: box
  7699.       entity_category: config
  7700.       skip_updates: 10
  7701.       #(Read only lower 8 bits)
  7702.       bitmask: 0x00FF
  7703.  
  7704.     - platform: modbus_controller
  7705.       modbus_controller_id: sprsun_pc
  7706.       name: ${friendly_name} E15 Economic heat temp 3
  7707.       address: 0x0177
  7708.       unit_of_measurement: "°C"
  7709.       #icon: "mdi:fan-speed-1"
  7710.       id: e15_economic_heat_temp_3
  7711.       value_type: U_WORD
  7712.       min_value: 10
  7713.       max_value: 55
  7714.       lambda: "return x * 0.5;"
  7715.       write_lambda: "return x / 0.5;"
  7716.       step: 1
  7717.       mode: box
  7718.       entity_category: config
  7719.       skip_updates: 10
  7720.       #(Read only lower 8 bits)
  7721.       bitmask: 0x00FF
  7722.  
  7723.     - platform: modbus_controller
  7724.       modbus_controller_id: sprsun_pc
  7725.       name: ${friendly_name} E16 Economic heat temp 4
  7726.       address: 0x0178
  7727.       unit_of_measurement: "°C"
  7728.       #icon: "mdi:fan-speed-1"
  7729.       id: e16_economic_heat_temp_4
  7730.       value_type: U_WORD
  7731.       min_value: 10
  7732.       max_value: 55
  7733.       lambda: "return x * 0.5;"
  7734.       write_lambda: "return x / 0.5;"
  7735.       step: 1
  7736.       mode: box
  7737.       entity_category: config
  7738.       skip_updates: 10
  7739.       #(Read only lower 8 bits)
  7740.       bitmask: 0x00FF
  7741.  
  7742. #################################################################
  7743.  
  7744. #Temperatura w trybie ECO dla CWU
  7745.     - platform: modbus_controller
  7746.       modbus_controller_id: sprsun_pc
  7747.       name: ${friendly_name} E17 Economic water temp 1
  7748.       address: 0x0179
  7749.       unit_of_measurement: "°C"
  7750.       #icon: "mdi:fan-speed-1"
  7751.       id: e17_economic_water_temp_1
  7752.       value_type: U_WORD
  7753.       min_value: 10
  7754.       max_value: 55
  7755.       lambda: "return x * 0.5;"
  7756.       write_lambda: "return x / 0.5;"
  7757.       step: 1
  7758.       mode: box
  7759.       entity_category: config
  7760.       skip_updates: 10
  7761.       #(Read only lower 8 bits)
  7762.       bitmask: 0x00FF
  7763.  
  7764.     - platform: modbus_controller
  7765.       modbus_controller_id: sprsun_pc
  7766.       name: ${friendly_name} E18 Economic water temp 2
  7767.       address: 0x017A
  7768.       unit_of_measurement: "°C"
  7769.       #icon: "mdi:fan-speed-1"
  7770.       id: e18_economic_water_temp_2
  7771.       value_type: U_WORD
  7772.       min_value: 10
  7773.       max_value: 55
  7774.       lambda: "return x * 0.5;"
  7775.       write_lambda: "return x / 0.5;"
  7776.       step: 1
  7777.       mode: box
  7778.       entity_category: config
  7779.       skip_updates: 10
  7780.       #(Read only lower 8 bits)
  7781.       bitmask: 0x00FF
  7782.  
  7783.     - platform: modbus_controller
  7784.       modbus_controller_id: sprsun_pc
  7785.       name: ${friendly_name} E19 Economic water temp 3
  7786.       address: 0x017B
  7787.       unit_of_measurement: "°C"
  7788.       #icon: "mdi:fan-speed-1"
  7789.       id: e19_economic_water_temp_3
  7790.       value_type: U_WORD
  7791.       min_value: 10
  7792.       max_value: 55
  7793.       lambda: "return x * 0.5;"
  7794.       write_lambda: "return x / 0.5;"
  7795.       step: 1
  7796.       mode: box
  7797.       entity_category: config
  7798.       skip_updates: 10
  7799.       #(Read only lower 8 bits)
  7800.       bitmask: 0x00FF
  7801.  
  7802.     - platform: modbus_controller
  7803.       modbus_controller_id: sprsun_pc
  7804.       name: ${friendly_name} E20 Economic water temp 4
  7805.       address: 0x017C
  7806.       unit_of_measurement: "°C"
  7807.       #icon: "mdi:fan-speed-1"
  7808.       id: e20_economic_water_temp_4
  7809.       value_type: U_WORD
  7810.       min_value: 10
  7811.       max_value: 55
  7812.       lambda: "return x * 0.5;"
  7813.       write_lambda: "return x / 0.5;"
  7814.       step: 1
  7815.       mode: box
  7816.       entity_category: config
  7817.       skip_updates: 10
  7818.       #(Read only lower 8 bits)
  7819.       bitmask: 0x00FF
  7820.  
  7821. #################################################################
  7822.  
  7823. #Temperatura w trybie ECO dla chłodzenia
  7824.     - platform: modbus_controller
  7825.       modbus_controller_id: sprsun_pc
  7826.       name: ${friendly_name} E21 Economic cool temp 1
  7827.       address: 0x017D
  7828.       unit_of_measurement: "°C"
  7829.       #icon: "mdi:fan-speed-1"
  7830.       id: e21_economic_cool_temp_1
  7831.       value_type: U_WORD
  7832.       min_value: 12
  7833.       max_value: 30
  7834.       lambda: "return x * 0.5;"
  7835.       write_lambda: "return x / 0.5;"
  7836.       step: 1
  7837.       mode: box
  7838.       entity_category: config
  7839.       skip_updates: 10
  7840.       #(Read only lower 8 bits)
  7841.       bitmask: 0x00FF
  7842.  
  7843.     - platform: modbus_controller
  7844.       modbus_controller_id: sprsun_pc
  7845.       name: ${friendly_name} E22 Economic cool temp 2
  7846.       address: 0x017E
  7847.       unit_of_measurement: "°C"
  7848.       #icon: "mdi:fan-speed-1"
  7849.       id: e22_economic_cool_temp_2
  7850.       value_type: U_WORD
  7851.       min_value: 12
  7852.       max_value: 30
  7853.       lambda: "return x * 0.5;"
  7854.       write_lambda: "return x / 0.5;"
  7855.       step: 1
  7856.       mode: box
  7857.       entity_category: config
  7858.       skip_updates: 10
  7859.       #(Read only lower 8 bits)
  7860.       bitmask: 0x00FF
  7861.  
  7862.     - platform: modbus_controller
  7863.       modbus_controller_id: sprsun_pc
  7864.       name: ${friendly_name} E23 Economic cool temp 3
  7865.       address: 0x017F
  7866.       unit_of_measurement: "°C"
  7867.       #icon: "mdi:fan-speed-1"
  7868.       id: e23_economic_cool_temp_3
  7869.       value_type: U_WORD
  7870.       min_value: 12
  7871.       max_value: 30
  7872.       lambda: "return x * 0.5;"
  7873.       write_lambda: "return x / 0.5;"
  7874.       step: 1
  7875.       mode: box
  7876.       entity_category: config
  7877.       skip_updates: 10
  7878.       #(Read only lower 8 bits)
  7879.       bitmask: 0x00FF
  7880.  
  7881.     - platform: modbus_controller
  7882.       modbus_controller_id: sprsun_pc
  7883.       name: ${friendly_name} E24 Economic cool temp 4
  7884.       address: 0x0180
  7885.       unit_of_measurement: "°C"
  7886.       #icon: "mdi:fan-speed-1"
  7887.       id: e24_economic_cool_temp_4
  7888.       value_type: U_WORD
  7889.       min_value: 12
  7890.       max_value: 30
  7891.       lambda: "return x * 0.5;"
  7892.       write_lambda: "return x / 0.5;"
  7893.       step: 1
  7894.       mode: box
  7895.       entity_category: config
  7896.       skip_updates: 10
  7897.       #(Read only lower 8 bits)
  7898.       bitmask: 0x00FF
  7899. ###########################################################################
  7900.  
  7901.     - platform: modbus_controller
  7902.       modbus_controller_id: sprsun_pc
  7903.       name: ${friendly_name} G08 Delay nagrzewnicy CWU
  7904.       address: 0x0181
  7905.       unit_of_measurement: "min"
  7906.       #icon: "mdi:fan-speed-1"
  7907.       id: g08_comp_delay
  7908.       value_type: U_WORD
  7909.       min_value: 1
  7910.       max_value: 60
  7911.       #lambda: "return x * 0.5;"
  7912.       #write_lambda: "return x / 0.5;"
  7913.       step: 1
  7914.       mode: box
  7915.       entity_category: config
  7916.       skip_updates: 10
  7917.  
  7918.     - platform: modbus_controller
  7919.       modbus_controller_id: sprsun_pc
  7920.       name: ${friendly_name} G06 Delay nagrzewnicy CO
  7921.       address: 0x0182
  7922.       unit_of_measurement: "min"
  7923.       #icon: "mdi:fan-speed-1"
  7924.       id: g06_comp_delay
  7925.       value_type: U_WORD
  7926.       min_value: 1
  7927.       max_value: 60
  7928.       #lambda: "return x * 0.5;"
  7929.       #write_lambda: "return x / 0.5;"
  7930.       step: 1
  7931.       mode: box
  7932.       entity_category: config
  7933.       skip_updates: 10
  7934.  
  7935.     - platform: modbus_controller
  7936.       modbus_controller_id: sprsun_pc
  7937.       name: ${friendly_name} G07 temperatura zew włączenia grzałki CWU
  7938.       address: 0x0183
  7939.       unit_of_measurement: "°C"
  7940.       #icon: "mdi:fan-speed-1"
  7941.       id: g07_hotwater_heater_ext
  7942.       value_type: S_WORD
  7943.       min_value: -30
  7944.       max_value: 30
  7945.       #lambda: "return x * 0.5;"
  7946.       #write_lambda: "return x / 0.5;"
  7947.       step: 1
  7948.       mode: box
  7949.       entity_category: config
  7950.       skip_updates: 10
  7951.  
  7952.     - platform: modbus_controller
  7953.       modbus_controller_id: sprsun_pc
  7954.       name: ${friendly_name} G05 temperatura zew włączenia grzałki CO
  7955.       address: 0x0184
  7956.       unit_of_measurement: "°C"
  7957.       #icon: "mdi:fan-speed-1"
  7958.       id: g05_heating_heater_ext
  7959.       value_type: S_WORD
  7960.       min_value: -30
  7961.       max_value: 30
  7962.       #lambda: "return x * 0.5;"
  7963.       #write_lambda: "return x / 0.5;"
  7964.       step: 1
  7965.       mode: box
  7966.       entity_category: config
  7967.       skip_updates: 10
  7968.  
  7969.     - platform: modbus_controller
  7970.       modbus_controller_id: sprsun_pc
  7971.       name: ${friendly_name} G03 Czas pracy pompy obiegowej w trybie Interwał
  7972.       address: 0x0185
  7973.       unit_of_measurement: "min"
  7974.       #icon: "mdi:fan-speed-1"
  7975.       id: g03_start_internal
  7976.       value_type: U_WORD
  7977.       min_value: 1
  7978.       max_value: 120
  7979.       #lambda: "return x * 0.5;"
  7980.       #write_lambda: "return x / 0.5;"
  7981.       step: 1
  7982.       mode: box
  7983.       entity_category: config
  7984.       skip_updates: 10
  7985.  
  7986.     - platform: modbus_controller
  7987.       modbus_controller_id: sprsun_pc
  7988.       name: ${friendly_name} F14 DC pump cycle
  7989.       address: 0x0187
  7990.       unit_of_measurement: "s"
  7991.       #icon: "mdi:fan-speed-1"
  7992.       id: f14_dc_pump_cycle
  7993.       value_type: U_WORD
  7994.       min_value: 10
  7995.       max_value: 120
  7996.       #lambda: "return x * 0.5;"
  7997.       #write_lambda: "return x / 0.5;"
  7998.       step: 1
  7999.       mode: box
  8000.       entity_category: config
  8001.       skip_updates: 10
  8002.  
  8003.     - platform: modbus_controller
  8004.       modbus_controller_id: sprsun_pc
  8005.       name: ${friendly_name} F15 DC pump freq set
  8006.       address: 0x0188
  8007.       unit_of_measurement: "%"
  8008.       #icon: "mdi:fan-speed-1"
  8009.       id: f15_dc_pump_freq_set
  8010.       value_type: U_WORD
  8011.       min_value: 10
  8012.       max_value: 100
  8013.       #lambda: "return x * 0.5;"
  8014.       #write_lambda: "return x / 0.5;"
  8015.       step: 1
  8016.       mode: box
  8017.       entity_category: config
  8018.       skip_updates: 10
  8019.  
  8020.     - platform: modbus_controller
  8021.       modbus_controller_id: sprsun_pc
  8022.       name: ${friendly_name} F16 DC pump max freq
  8023.       address: 0x0189
  8024.       unit_of_measurement: "%"
  8025.       #icon: "mdi:fan-speed-1"
  8026.       id: f16_dc_pump_max_freq
  8027.       value_type: U_WORD
  8028.       min_value: 10
  8029.       max_value: 100
  8030.       #lambda: "return x * 0.5;"
  8031.       #write_lambda: "return x / 0.5;"
  8032.       step: 1
  8033.       mode: box
  8034.       entity_category: config
  8035.       skip_updates: 10
  8036.  
  8037.     - platform: modbus_controller
  8038.       modbus_controller_id: sprsun_pc
  8039.       name: ${friendly_name} F17 DC pump min freq
  8040.       address: 0x018A
  8041.       unit_of_measurement: "%"
  8042.       #icon: "mdi:fan-speed-1"
  8043.       id: f17_dc_pump_min_freq
  8044.       value_type: U_WORD
  8045.       min_value: 10
  8046.       max_value: 100
  8047.       #lambda: "return x * 0.5;"
  8048.       #write_lambda: "return x / 0.5;"
  8049.       step: 1
  8050.       mode: box
  8051.       entity_category: config
  8052.       skip_updates: 10
  8053.  
  8054.     - platform: modbus_controller
  8055.       modbus_controller_id: sprsun_pc
  8056.       name: ${friendly_name} F18 DC pump scale factor
  8057.       address: 0x018B
  8058.       #unit_of_measurement: "%"
  8059.       #icon: "mdi:fan-speed-1"
  8060.       id: f18_dc_pump_scale_factor
  8061.       value_type: U_WORD
  8062.       min_value: 1
  8063.       max_value: 10
  8064.       #lambda: "return x * 0.5;"
  8065.       #write_lambda: "return x / 0.5;"
  8066.       step: 1
  8067.       mode: box
  8068.       entity_category: config
  8069.       skip_updates: 10
  8070.  
  8071.     - platform: modbus_controller
  8072.       modbus_controller_id: sprsun_pc
  8073.       name: ${friendly_name} F19 DC pump diff
  8074.       address: 0x018C
  8075.       #unit_of_measurement: "%"
  8076.       #icon: "mdi:fan-speed-1"
  8077.       id: f19_dc_pump_diff
  8078.       value_type: U_WORD
  8079.       min_value: 0
  8080.       max_value: 100
  8081.       #lambda: "return x * 0.5;"
  8082.       #write_lambda: "return x / 0.5;"
  8083.       step: 1
  8084.       mode: box
  8085.       entity_category: config
  8086.       skip_updates: 10
  8087.  
  8088.     - platform: modbus_controller
  8089.       modbus_controller_id: sprsun_pc
  8090.       name: ${friendly_name} G04 Delta pompy obiegowej
  8091.       address: 0x018D
  8092.       unit_of_measurement: "°C"
  8093.       #icon: "mdi:fan-speed-1"
  8094.       id: g04_delta_temp_set
  8095.       value_type: U_WORD
  8096.       min_value: 5
  8097.       max_value: 30
  8098.       #lambda: "return x * 0.5;"
  8099.       #write_lambda: "return x / 0.5;"
  8100.       step: 1
  8101.       mode: box
  8102.       entity_category: config
  8103.       skip_updates: 10
  8104. ####################################################
  8105.  
  8106.     # - platform: modbus_controller
  8107.     #   modbus_controller_id: sprsun_pc
  8108.     #   name: ${friendly_name} F21 Comp freq scale factor
  8109.     #   address: 0x018E
  8110.     #   #unit_of_measurement: "%"
  8111.     #   #icon: "mdi:fan-speed-1"
  8112.     #   id: f21_comp_freq_scale_factor
  8113.     #   value_type: U_WORD
  8114.     #   min_value: 1
  8115.     #   max_value: 10
  8116.     #   #lambda: "return x * 0.5;"
  8117.     #   #write_lambda: "return x / 0.5;"
  8118.     #   step: 1
  8119.     #   mode: box
  8120.     #   entity_category: config
  8121.     #   skip_updates: 10
  8122.  
  8123.     # - platform: modbus_controller
  8124.     #   modbus_controller_id: sprsun_pc
  8125.     #   name: ${friendly_name} F22 Comp freq diff
  8126.     #   address: 0x018F
  8127.     #   #unit_of_measurement: "%"
  8128.     #   #icon: "mdi:fan-speed-1"
  8129.     #   id: f22_comp_freq_diff
  8130.     #   value_type: U_WORD
  8131.     #   min_value: 0
  8132.     #   max_value: 100
  8133.     #   #lambda: "return x * 0.5;"
  8134.     #   #write_lambda: "return x / 0.5;"
  8135.     #   step: 1
  8136.     #   mode: box
  8137.     #   entity_category: config
  8138.     #   skip_updates: 10
  8139.  
  8140.     - platform: modbus_controller
  8141.       modbus_controller_id: sprsun_pc
  8142.       name: ${friendly_name} G10 Temperatura przełączenia grzanie/chłodzenie
  8143.       address: 0x0192
  8144.       unit_of_measurement: "°C"
  8145.       #icon: "mdi:fan-speed-1"
  8146.       id: g10_ambtemp_switch_setp
  8147.       value_type: S_WORD
  8148.       min_value: -20
  8149.       max_value: 30
  8150.       #lambda: "return x * 0.5;"
  8151.       #write_lambda: "return x / 0.5;"
  8152.       step: 1
  8153.       mode: box
  8154.       entity_category: config
  8155.       skip_updates: 10
  8156.  
  8157.     - platform: modbus_controller
  8158.       modbus_controller_id: sprsun_pc
  8159.       name: ${friendly_name} G11 Histereza przełączenia grzanie/chłodzenie
  8160.       address: 0x0193
  8161.       unit_of_measurement: "°C"
  8162.       #icon: "mdi:fan-speed-1"
  8163.       id: g11_ambtemp_diff
  8164.       value_type: U_WORD
  8165.       min_value: 1
  8166.       max_value: 10
  8167.       #lambda: "return x * 0.5;"
  8168.       #write_lambda: "return x / 0.5;"
  8169.       step: 1
  8170.       mode: box
  8171.       entity_category: config
  8172.       skip_updates: 10
  8173.  
  8174.     - platform: modbus_controller
  8175.       modbus_controller_id: sprsun_pc
  8176.       name: ${friendly_name} F27 Limit freq temp diff
  8177.       address: 0x0194
  8178.       unit_of_measurement: "°C"
  8179.       #icon: "mdi:fan-speed-1"
  8180.       id: f27_limit_freq_temp_diff
  8181.       value_type: U_WORD
  8182.       min_value: 5
  8183.       max_value: 20
  8184.       #lambda: "return x * 0.5;"
  8185.       #write_lambda: "return x / 0.5;"
  8186.       step: 1
  8187.       mode: box
  8188.       entity_category: config
  8189.       skip_updates: 10
  8190.  
  8191.     - platform: modbus_controller
  8192.       modbus_controller_id: sprsun_pc
  8193.       name: ${friendly_name} F28 Dec freq temp diff
  8194.       address: 0x0195
  8195.       unit_of_measurement: "°C"
  8196.       #icon: "mdi:fan-speed-1"
  8197.       id: f28_dec_freq_temp_diff
  8198.       value_type: U_WORD
  8199.       min_value: 5
  8200.       max_value: 20
  8201.       #lambda: "return x * 0.5;"
  8202.       #write_lambda: "return x / 0.5;"
  8203.       step: 1
  8204.       mode: box
  8205.       entity_category: config
  8206.       skip_updates: 10
  8207.  
  8208.     - platform: modbus_controller
  8209.       modbus_controller_id: sprsun_pc
  8210.       name: ${friendly_name} F29 Limit freq outlet low
  8211.       address: 0x0196
  8212.       unit_of_measurement: "°C"
  8213.       #icon: "mdi:fan-speed-1"
  8214.       id: f29_limit_freq_outlet_low
  8215.       value_type: U_WORD
  8216.       min_value: 0
  8217.       max_value: 20
  8218.       #lambda: "return x * 0.5;"
  8219.       #write_lambda: "return x / 0.5;"
  8220.       step: 1
  8221.       mode: box
  8222.       entity_category: config
  8223.       skip_updates: 10
  8224.  
  8225.     - platform: modbus_controller
  8226.       modbus_controller_id: sprsun_pc
  8227.       name: ${friendly_name} F30 Dec freq outlet low
  8228.       address: 0x0197
  8229.       unit_of_measurement: "°C"
  8230.       #icon: "mdi:fan-speed-1"
  8231.       id: f30_dec_freq_outlet_low
  8232.       value_type: U_WORD
  8233.       min_value: 0
  8234.       max_value: 20
  8235.       #lambda: "return x * 0.5;"
  8236.       #write_lambda: "return x / 0.5;"
  8237.       step: 1
  8238.       mode: box
  8239.       entity_category: config
  8240.       skip_updates: 10
  8241.  
  8242.     - platform: modbus_controller
  8243.       modbus_controller_id: sprsun_pc
  8244.       name: ${friendly_name} F31 Limit freq outlet high
  8245.       address: 0x0198
  8246.       unit_of_measurement: "°C"
  8247.       #icon: "mdi:fan-speed-1"
  8248.       id: f31_limit_freq_outlet_high
  8249.       value_type: U_WORD
  8250.       min_value: 30
  8251.       max_value: 80
  8252.       #lambda: "return x * 0.5;"
  8253.       #write_lambda: "return x / 0.5;"
  8254.       step: 1
  8255.       mode: box
  8256.       entity_category: config
  8257.       skip_updates: 10
  8258.  
  8259.     - platform: modbus_controller
  8260.       modbus_controller_id: sprsun_pc
  8261.       name: ${friendly_name} F32 Dec freq outlet high
  8262.       address: 0x0199
  8263.       unit_of_measurement: "°C"
  8264.       #icon: "mdi:fan-speed-1"
  8265.       id: f32_dec_freq_outlet_low
  8266.       value_type: U_WORD
  8267.       min_value: 30
  8268.       max_value: 80
  8269.       #lambda: "return x * 0.5;"
  8270.       #write_lambda: "return x / 0.5;"
  8271.       step: 1
  8272.       mode: box
  8273.       entity_category: config
  8274.       skip_updates: 10
  8275.  
  8276.     - platform: modbus_controller
  8277.       modbus_controller_id: sprsun_pc
  8278.       name: ${friendly_name} Nastawa temp tryb antilegionella
  8279.       address: 0x019A
  8280.       unit_of_measurement: "°C"
  8281.       #icon: "mdi:fan-speed-1"
  8282.       id: temp_setpoint_of_antilegionella
  8283.       value_type: U_WORD
  8284.       min_value: 30
  8285.       max_value: 70
  8286.       #lambda: "return x * 0.5;"
  8287.       #write_lambda: "return x / 0.5;"
  8288.       step: 1
  8289.       mode: box
  8290.       entity_category: config
  8291.       skip_updates: 10
  8292.  
  8293.     - platform: modbus_controller
  8294.       modbus_controller_id: sprsun_pc
  8295.       name: ${friendly_name} Start tryb antilegionella
  8296.       address: 0x019C
  8297.       unit_of_measurement: "hour"
  8298.       #icon: "mdi:fan-speed-1"
  8299.       id: start_timer_of_antilegionella
  8300.       value_type: U_WORD
  8301.       min_value: 0
  8302.       max_value: 23
  8303.       #lambda: "return x * 0.5;"
  8304.       #write_lambda: "return x / 0.5;"
  8305.       step: 1
  8306.       mode: box
  8307.       entity_category: config
  8308.       skip_updates: 10
  8309.  
  8310.     - platform: modbus_controller
  8311.       modbus_controller_id: sprsun_pc
  8312.       name: ${friendly_name} Stop tryb antilegionella
  8313.       address: 0x019D
  8314.       unit_of_measurement: "hour"
  8315.       #icon: "mdi:fan-speed-1"
  8316.       id: stop_timer_of_antilegionella
  8317.       value_type: U_WORD
  8318.       min_value: 0
  8319.       max_value: 23
  8320.       #lambda: "return x * 0.5;"
  8321.       #write_lambda: "return x / 0.5;"
  8322.       step: 1
  8323.       mode: box
  8324.       entity_category: config
  8325.       skip_updates: 10
  8326.  
  8327.     - platform: modbus_controller
  8328.       modbus_controller_id: sprsun_pc
  8329.       name: ${friendly_name} F35 Antifreeze cycle
  8330.       address: 0x019F
  8331.       unit_of_measurement: "min"
  8332.       #icon: "mdi:fan-speed-1"
  8333.       id: f35_antifreeze_cycle
  8334.       value_type: U_WORD
  8335.       min_value: 1
  8336.       max_value: 60
  8337.       #lambda: "return x * 0.5;"
  8338.       #write_lambda: "return x / 0.5;"
  8339.       step: 1
  8340.       mode: box
  8341.       entity_category: config
  8342.       skip_updates: 10
  8343.  
  8344.     - platform: modbus_controller
  8345.       modbus_controller_id: sprsun_pc
  8346.       name: ${friendly_name} F36 Three-way valve cycle
  8347.       address: 0x01A0
  8348.       unit_of_measurement: "hour"
  8349.       #icon: "mdi:fan-speed-1"
  8350.       id: f36_threeway_valve_cycle
  8351.       value_type: U_WORD
  8352.       min_value: 1
  8353.       max_value: 60
  8354.       #lambda: "return x * 0.5;"
  8355.       #write_lambda: "return x / 0.5;"
  8356.       step: 1
  8357.       mode: box
  8358.       entity_category: config
  8359.       skip_updates: 10
  8360.  
  8361.     - platform: modbus_controller
  8362.       modbus_controller_id: sprsun_pc
  8363.       name: ${friendly_name} F37 Pump cycle in error
  8364.       address: 0x01A1
  8365.       unit_of_measurement: "min"
  8366.       #icon: "mdi:fan-speed-1"
  8367.       id: f37_pump_cycle_in_error
  8368.       value_type: U_WORD
  8369.       min_value: 1
  8370.       max_value: 120
  8371.       #lambda: "return x * 0.5;"
  8372.       #write_lambda: "return x / 0.5;"
  8373.       step: 1
  8374.       mode: box
  8375.       entity_category: config
  8376.       skip_updates: 10
  8377.  
  8378.     - platform: modbus_controller
  8379.       modbus_controller_id: sprsun_pc
  8380.       name: ${friendly_name} F38 Comp freq cycle
  8381.       address: 0x01A2
  8382.       unit_of_measurement: "s"
  8383.       #icon: "mdi:fan-speed-1"
  8384.       id: f38_comp_freq_cycle
  8385.       value_type: U_WORD
  8386.       min_value: 20
  8387.       max_value: 60
  8388.       #lambda: "return x * 0.5;"
  8389.       #write_lambda: "return x / 0.5;"
  8390.       step: 1
  8391.       mode: box
  8392.       entity_category: config
  8393.       skip_updates: 10
  8394.  
  8395.     - platform: modbus_controller
  8396.       modbus_controller_id: sprsun_pc
  8397.       name: ${friendly_name} F41 Air too low stp.
  8398.       address: 0x01A3
  8399.       unit_of_measurement: "°C"
  8400.       #icon: "mdi:fan-speed-1"
  8401.       id: f41_air_too_low_stp
  8402.       value_type: S_WORD
  8403.       min_value: -40
  8404.       max_value: 0
  8405.       #lambda: "return x * 0.5;"
  8406.       #write_lambda: "return x / 0.5;"
  8407.       step: 1
  8408.       mode: box
  8409.       entity_category: config
  8410.       skip_updates: 10
  8411.  
  8412. #######################################################
  8413. #############   Nastawy Timeband
  8414. #### Timeband 1
  8415.     - platform: modbus_controller
  8416.       modbus_controller_id: sprsun_pc
  8417.       name: ${friendly_name} Nastawa CWU Timeband 1
  8418.       address: 0x01A4
  8419.       unit_of_measurement: "°C"
  8420.       #icon: "mdi:fan-speed-1"
  8421.       id: hotwater_set_temp_of_timeband_1
  8422.       value_type: U_WORD
  8423.       min_value: 28
  8424.       max_value: 60
  8425.       lambda: "return x * 0.5;"
  8426.       write_lambda: "return x / 0.5;"
  8427.       step: 1
  8428.       mode: box
  8429.       entity_category: config
  8430.       skip_updates: 10
  8431.       #(Read only lower 8 bits)
  8432.       bitmask: 0x00FF
  8433.  
  8434.     - platform: modbus_controller
  8435.       modbus_controller_id: sprsun_pc
  8436.       name: ${friendly_name} Nastawa CO Timeband 1
  8437.       address: 0x01A5
  8438.       unit_of_measurement: "°C"
  8439.       #icon: "mdi:fan-speed-1"
  8440.       id: heat_setpoint_of_timeband_1
  8441.       value_type: U_WORD
  8442.       min_value: 15
  8443.       max_value: 50
  8444.       lambda: "return x * 0.5;"
  8445.       write_lambda: "return x / 0.5;"
  8446.       step: 1
  8447.       mode: box
  8448.       entity_category: config
  8449.       skip_updates: 10
  8450.       #(Read only lower 8 bits)
  8451.       bitmask: 0x00FF
  8452.  
  8453.     - platform: modbus_controller
  8454.       modbus_controller_id: sprsun_pc
  8455.       name: ${friendly_name} Nastawa chłodzenie Timeband 1
  8456.       address: 0x01A6
  8457.       unit_of_measurement: "°C"
  8458.       #icon: "mdi:fan-speed-1"
  8459.       id: cool_setpoint_of_timeband_1
  8460.       value_type: U_WORD
  8461.       min_value: 7
  8462.       max_value: 30
  8463.       lambda: "return x * 0.5;"
  8464.       write_lambda: "return x / 0.5;"
  8465.       step: 1
  8466.       mode: box
  8467.       entity_category: config
  8468.       skip_updates: 10
  8469.       #(Read only lower 8 bits)
  8470.       bitmask: 0x00FF
  8471.  
  8472. ####Timeband 2
  8473.     - platform: modbus_controller
  8474.       modbus_controller_id: sprsun_pc
  8475.       name: ${friendly_name} Nastawa CWU Timeband 2
  8476.       address: 0x01A7
  8477.       unit_of_measurement: "°C"
  8478.       #icon: "mdi:fan-speed-1"
  8479.       id: hotwater_set_temp_of_timeband_2
  8480.       value_type: U_WORD
  8481.       min_value: 28
  8482.       max_value: 60
  8483.       lambda: "return x * 0.5;"
  8484.       write_lambda: "return x / 0.5;"
  8485.       step: 1
  8486.       mode: box
  8487.       entity_category: config
  8488.       skip_updates: 10
  8489.       #(Read only lower 8 bits)
  8490.       bitmask: 0x00FF
  8491.  
  8492.     - platform: modbus_controller
  8493.       modbus_controller_id: sprsun_pc
  8494.       name: ${friendly_name} Nastawa CO Timeband 2
  8495.       address: 0x01A8
  8496.       unit_of_measurement: "°C"
  8497.       #icon: "mdi:fan-speed-1"
  8498.       id: heat_setpoint_of_timeband_2
  8499.       value_type: U_WORD
  8500.       min_value: 15
  8501.       max_value: 50
  8502.       lambda: "return x * 0.5;"
  8503.       write_lambda: "return x / 0.5;"
  8504.       step: 1
  8505.       mode: box
  8506.       entity_category: config
  8507.       skip_updates: 10
  8508.       #(Read only lower 8 bits)
  8509.       bitmask: 0x00FF
  8510.  
  8511.     - platform: modbus_controller
  8512.       modbus_controller_id: sprsun_pc
  8513.       name: ${friendly_name} Nastawa chłodzenie Timeband 2
  8514.       address: 0x01A9
  8515.       unit_of_measurement: "°C"
  8516.       #icon: "mdi:fan-speed-1"
  8517.       id: cool_setpoint_of_timeband_2
  8518.       value_type: U_WORD
  8519.       min_value: 7
  8520.       max_value: 30
  8521.       lambda: "return x * 0.5;"
  8522.       write_lambda: "return x / 0.5;"
  8523.       step: 1
  8524.       mode: box
  8525.       entity_category: config
  8526.       skip_updates: 10
  8527.       #(Read only lower 8 bits)
  8528.       bitmask: 0x00FF
  8529.  
  8530. ####Timeband 3
  8531.     - platform: modbus_controller
  8532.       modbus_controller_id: sprsun_pc
  8533.       name: ${friendly_name} Nastawa CWU Timeband 3
  8534.       address: 0x01AA
  8535.       unit_of_measurement: "°C"
  8536.       #icon: "mdi:fan-speed-1"
  8537.       id: hotwater_set_temp_of_timeband_3
  8538.       value_type: U_WORD
  8539.       min_value: 28
  8540.       max_value: 60
  8541.       lambda: "return x * 0.5;"
  8542.       write_lambda: "return x / 0.5;"
  8543.       step: 1
  8544.       mode: box
  8545.       entity_category: config
  8546.       skip_updates: 10
  8547.       #(Read only lower 8 bits)
  8548.       bitmask: 0x00FF
  8549.  
  8550.     - platform: modbus_controller
  8551.       modbus_controller_id: sprsun_pc
  8552.       name: ${friendly_name} Nastawa CO Timeband 3
  8553.       address: 0x01AB
  8554.       unit_of_measurement: "°C"
  8555.       #icon: "mdi:fan-speed-1"
  8556.       id: heat_setpoint_of_timeband_3
  8557.       value_type: U_WORD
  8558.       min_value: 15
  8559.       max_value: 50
  8560.       lambda: "return x * 0.5;"
  8561.       write_lambda: "return x / 0.5;"
  8562.       step: 1
  8563.       mode: box
  8564.       entity_category: config
  8565.       skip_updates: 10
  8566.       #(Read only lower 8 bits)
  8567.       bitmask: 0x00FF
  8568.  
  8569.     - platform: modbus_controller
  8570.       modbus_controller_id: sprsun_pc
  8571.       name: ${friendly_name} Nastawa chłodzenie Timeband 3
  8572.       address: 0x01AC
  8573.       unit_of_measurement: "°C"
  8574.       #icon: "mdi:fan-speed-1"
  8575.       id: cool_setpoint_of_timeband_3
  8576.       value_type: U_WORD
  8577.       min_value: 7
  8578.       max_value: 30
  8579.       lambda: "return x * 0.5;"
  8580.       write_lambda: "return x / 0.5;"
  8581.       step: 1
  8582.       mode: box
  8583.       entity_category: config
  8584.       skip_updates: 10
  8585. ########################################################
  8586.  
  8587.     # - platform: modbus_controller
  8588.     #   modbus_controller_id: sprsun_pc
  8589.     #   name: ${friendly_name} H17 Def fan high press
  8590.     #   address: 0x01B0
  8591.     #   unit_of_measurement: "bar"
  8592.     #   #icon: "mdi:fan-speed-1"
  8593.     #   id: h17_def_fan_high_press
  8594.     #   value_type: U_WORD
  8595.     #   min_value: 20
  8596.     #   max_value: 40
  8597.     #   #lambda: "return x * 0.5;"
  8598.     #   #write_lambda: "return x / 0.5;"
  8599.     #   step: 1
  8600.     #   mode: box
  8601.     #   entity_category: config
  8602.     #   skip_updates: 10
  8603.  
  8604.     # - platform: modbus_controller
  8605.     #   modbus_controller_id: sprsun_pc
  8606.     #   name: ${friendly_name} H18 Def fan speed
  8607.     #   address: 0x01B1
  8608.     #   unit_of_measurement: "rpm"
  8609.     #   #icon: "mdi:fan-speed-1"
  8610.     #   id: h18_def_fan_speed
  8611.     #   value_type: U_WORD
  8612.     #   min_value: 20
  8613.     #   max_value: 100
  8614.     #   lambda: "return x / 10.0;"
  8615.     #   write_lambda: "return x * 10.0;"
  8616.     #   step: 1
  8617.     #   mode: box
  8618.     #   entity_category: config
  8619.     #   skip_updates: 10
  8620.  
  8621.     # - platform: modbus_controller
  8622.     #   modbus_controller_id: sprsun_pc
  8623.     #   name: ${friendly_name} F47 High press adjust
  8624.     #   address: 0x01B2
  8625.     #   unit_of_measurement: "bar"
  8626.     #   #icon: "mdi:fan-speed-1"
  8627.     #   id: f47_high_press_adjust
  8628.     #   value_type: S_WORD
  8629.     #   min_value: -50
  8630.     #   max_value: 50
  8631.     #   #lambda: "return x / 10.0;"
  8632.     #   #write_lambda: "return x * 10.0;"
  8633.     #   step: 1
  8634.     #   mode: box
  8635.     #   entity_category: config
  8636.     #   skip_updates: 10
  8637.  
  8638.     # - platform: modbus_controller
  8639.     #   modbus_controller_id: sprsun_pc
  8640.     #   name: ${friendly_name} F48 Low press adjust
  8641.     #   address: 0x01B3
  8642.     #   unit_of_measurement: "bar"
  8643.     #   #icon: "mdi:fan-speed-1"
  8644.     #   id: f48_low_press_adjust
  8645.     #   value_type: S_WORD
  8646.     #   min_value: -50
  8647.     #   max_value: 50
  8648.     #   #lambda: "return x / 10.0;"
  8649.     #   #write_lambda: "return x * 10.0;"
  8650.     #   step: 1
  8651.     #   mode: box
  8652.     #   entity_category: config
  8653.     #   skip_updates: 10
  8654.  
  8655.     # - platform: modbus_controller
  8656.     #   modbus_controller_id: sprsun_pc
  8657.     #   name: ${friendly_name} F51 Air too low diff
  8658.     #   address: 0x01B4
  8659.     #   unit_of_measurement: "°C"
  8660.     #   #icon: "mdi:fan-speed-1"
  8661.     #   id: f51_air_too_low_diff
  8662.     #   value_type: U_WORD
  8663.     #   min_value: 1
  8664.     #   max_value: 10
  8665.     #   #lambda: "return x / 10.0;"
  8666.     #   #write_lambda: "return x * 10.0;"
  8667.     #   step: 1
  8668.     #   mode: box
  8669.     #   entity_category: config
  8670.     #   skip_updates: 10
  8671.  
  8672.     # - platform: modbus_controller
  8673.     #   modbus_controller_id: sprsun_pc
  8674.     #   name: ${friendly_name} B93 AV init outlet stp
  8675.     #   address: 0x01B5
  8676.     #   unit_of_measurement: "°C"
  8677.     #   #icon: "mdi:fan-speed-1"
  8678.     #   id: b93_av_init_outlet_stp
  8679.     #   value_type: U_WORD
  8680.     #   min_value: 20
  8681.     #   max_value: 60
  8682.     #   #lambda: "return x / 10.0;"
  8683.     #   #write_lambda: "return x * 10.0;"
  8684.     #   step: 1
  8685.     #   mode: box
  8686.     #   entity_category: config
  8687.     #   skip_updates: 10
  8688.  
  8689.     # - platform: modbus_controller
  8690.     #   modbus_controller_id: sprsun_pc
  8691.     #   name: ${friendly_name} F53 Outlet temp offset stp
  8692.     #   address: 0x01B6
  8693.     #   unit_of_measurement: "°C"
  8694.     #   #icon: "mdi:fan-speed-1"
  8695.     #   id: f53_outlet_temp_offset_stp
  8696.     #   value_type: U_WORD
  8697.     #   min_value: 30
  8698.     #   max_value: 55
  8699.     #   #lambda: "return x / 10.0;"
  8700.     #   #write_lambda: "return x * 10.0;"
  8701.     #   step: 1
  8702.     #   mode: box
  8703.     #   entity_category: config
  8704.     #   skip_updates: 10
  8705.  
  8706.     # - platform: modbus_controller
  8707.     #   modbus_controller_id: sprsun_pc
  8708.     #   name: ${friendly_name} F52 Outlet temp offset stp
  8709.     #   address: 0x01B7
  8710.     #   unit_of_measurement: "°C"
  8711.     #   #icon: "mdi:fan-speed-1"
  8712.     #   id: f52_outlet_temp_offset_stp
  8713.     #   value_type: U_WORD
  8714.     #   min_value: 0
  8715.     #   max_value: 50
  8716.     #   #lambda: "return x / 10.0;"
  8717.     #   #write_lambda: "return x * 10.0;"
  8718.     #   step: 1
  8719.     #   mode: box
  8720.     #   entity_category: config
  8721.     #   skip_updates: 10
  8722.  
  8723.     # - platform: modbus_controller
  8724.     #   modbus_controller_id: sprsun_pc
  8725.     #   name: ${friendly_name} F54 Heat upper limit stp
  8726.     #   address: 0x01B8
  8727.     #   unit_of_measurement: "°C"
  8728.     #   #icon: "mdi:fan-speed-1"
  8729.     #   id: f54_heat_upper_limit_stp
  8730.     #   value_type: U_WORD
  8731.     #   min_value: 10
  8732.     #   max_value: 80
  8733.     #   #lambda: "return x / 10.0;"
  8734.     #   #write_lambda: "return x * 10.0;"
  8735.     #   step: 1
  8736.     #   mode: box
  8737.     #   entity_category: config
  8738.     #   skip_updates: 10
  8739.  
  8740.     # - platform: modbus_controller
  8741.     #   modbus_controller_id: sprsun_pc
  8742.     #   name: ${friendly_name} F55 Cool lower limit stp
  8743.     #   address: 0x01B9
  8744.     #   unit_of_measurement: "°C"
  8745.     #   #icon: "mdi:fan-speed-1"
  8746.     #   id: f55_cool_lower_limit_stp
  8747.     #   value_type: U_WORD
  8748.     #   min_value: 7
  8749.     #   max_value: 30
  8750.     #   #lambda: "return x / 10.0;"
  8751.     #   #write_lambda: "return x * 10.0;"
  8752.     #   step: 1
  8753.     #   mode: box
  8754.     #   entity_category: config
  8755.     #   skip_updates: 10
  8756.  
  8757.     - platform: modbus_controller
  8758.       modbus_controller_id: sprsun_pc
  8759.       name: ${friendly_name} R94 Oil return freq.
  8760.       address: 0x01BB
  8761.       unit_of_measurement: "Hz"
  8762.       #icon: "mdi:fan-speed-1"
  8763.       id: r94_oil_return_freq
  8764.       value_type: U_WORD
  8765.       min_value: 10
  8766.       max_value: 70
  8767.       #lambda: "return x / 10.0;"
  8768.       #write_lambda: "return x * 10.0;"
  8769.       step: 1
  8770.       mode: box
  8771.       entity_category: config
  8772.       skip_updates: 10
Advertisement
Add Comment
Please, Sign In to add comment