├── .gitignore ├── README.md └── modbus_lg_heatpump.yaml /.gitignore: -------------------------------------------------------------------------------- 1 | secret.yaml 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Description 2 | This package is for connecting and controlling an LG Therma V heat pump with Homeassistant via Modbus RTU. 3 | 4 | You will find all information [here](https://github.com/basti242/homeassistant_lg_therma_v_modbus/wiki). 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /modbus_lg_heatpump.yaml: -------------------------------------------------------------------------------- 1 | # Home Assistant LG Heatpump integration 2 | # last update: 2024-10-02 (for Homeassistant update 2024.10) 3 | 4 | modbus: 5 | - name: "lg_heatpump" 6 | type: tcp 7 | host: !secret lg_heatpump_modbus_host_ip 8 | port: !secret lg_heatpump_modbus_port 9 | 10 | #------------------------------------------ 11 | sensors: 12 | # Technische Daten 13 | # Input Register 14 | #------------------------------------------ 15 | 16 | - name: "hp_error_code" 17 | unique_id: "modbus.hp_error_code" 18 | scan_interval: 10 19 | address: 0 # reg 1 20 | slave: !secret lg_heatpump_modbus_slave 21 | input_type: input 22 | 23 | - name: "hp_odu_operation_cycle" 24 | unique_id: "modbus.hp_odu_operation_cycle" 25 | scan_interval: 10 26 | address: 1 27 | slave: !secret lg_heatpump_modbus_slave 28 | input_type: input 29 | 30 | - name: "hp_inlet_temp" 31 | unique_id: "modbus.hp_inlet_temp" 32 | scale: 0.1 33 | precision: 1 34 | scan_interval: 30 35 | address: 2 # reg 3 36 | slave: !secret lg_heatpump_modbus_slave 37 | unit_of_measurement: °C 38 | device_class: temperature 39 | input_type: input 40 | 41 | - name: "hp_outlet_temp" 42 | unique_id: "modbus.hp_outlet_temp" 43 | scale: 0.1 44 | precision: 1 45 | scan_interval: 30 46 | address: 3 # reg 4 47 | slave: !secret lg_heatpump_modbus_slave 48 | unit_of_measurement: °C 49 | device_class: temperature 50 | input_type: input 51 | 52 | - name: "hp_backup_heater_outlet_temp" 53 | unique_id: "modbus.hp_backup_heater_outlet_temp" 54 | scale: 0.1 55 | precision: 1 56 | scan_interval: 30 57 | address: 4 # reg 5 58 | slave: !secret lg_heatpump_modbus_slave 59 | unit_of_measurement: °C 60 | device_class: temperature 61 | input_type: input 62 | 63 | - name: "hp_dhw_water_temp" 64 | unique_id: "modbus.hp_dhw_water_temp" 65 | scale: 0.1 66 | precision: 1 67 | scan_interval: 30 68 | address: 5 # reg 6 69 | slave: !secret lg_heatpump_modbus_slave 70 | unit_of_measurement: °C 71 | device_class: temperature 72 | input_type: input 73 | 74 | - name: "hp_solar_collector_temp" 75 | unique_id: "modbus.hp_solar_collector_temp" 76 | scale: 0.1 77 | precision: 1 78 | scan_interval: 30 79 | address: 6 # reg 7 80 | slave: !secret lg_heatpump_modbus_slave 81 | unit_of_measurement: °C 82 | device_class: temperature 83 | input_type: input 84 | 85 | - name: "hp_temp_technikraum" # Temperatur Technikraum 86 | unique_id: "modbus.hp_temp_technikraum" 87 | precision: 1 88 | scan_interval: 10 89 | address: 7 90 | slave: !secret lg_heatpump_modbus_slave 91 | scale: 0.1 92 | device_class: temperature 93 | unit_of_measurement: "°C" 94 | input_type: input 95 | 96 | - name: "hp_flow_rate" 97 | unique_id: "modbus.hp_flow_rate" 98 | precision: 1 99 | scale: 0.1 100 | scan_interval: 10 101 | address: 8 102 | slave: !secret lg_heatpump_modbus_slave 103 | unit_of_measurement: "l/min" 104 | input_type: input 105 | 106 | - name: "hp_flow_temp_circle_2" 107 | unique_id: "modbus.hp_flow_temp_circle_2" 108 | scale: 0.1 109 | precision: 1 110 | scan_interval: 10 111 | address: 9 # reg 10 112 | slave: !secret lg_heatpump_modbus_slave 113 | device_class: temperature 114 | unit_of_measurement: °C 115 | input_type: input 116 | 117 | - name: "hp_room_air_temp_circuit2_input" 118 | unique_id: "modbus.hp_room_air_temp_circuit2_input" 119 | precision: 1 120 | scan_interval: 10 121 | address: 10 # reg 11 122 | slave: !secret lg_heatpump_modbus_slave 123 | scale: 0.1 124 | device_class: temperature 125 | unit_of_measurement: "°C" 126 | input_type: input 127 | 128 | - name: "hp_energy_state_input" 129 | unique_id: "modbus.hp_energy_state_input" 130 | scan_interval: 10 131 | address: 11 # reg 12 132 | slave: !secret lg_heatpump_modbus_slave 133 | input_type: input 134 | 135 | - name: "hp_outside_temp" # Außentemperatur 136 | unique_id: "modbus.hp_outside_temp" 137 | precision: 1 138 | scan_interval: 10 139 | address: 12 140 | slave: !secret lg_heatpump_modbus_slave 141 | scale: 0.1 142 | device_class: temperature 143 | unit_of_measurement: "°C" 144 | input_type: input 145 | 146 | - name: "hp_temp_liquid_gas" # Temperatur Flüssiggas 147 | unique_id: "modbus.hp_temp_liquid_gas" 148 | scan_interval: 10 149 | address: 16 150 | unit_of_measurement: "°C" 151 | slave: !secret lg_heatpump_modbus_slave 152 | input_type: input 153 | 154 | - name: "hp_temp_suction" # Temperatur Absaugung 155 | unique_id: "modbus.hp_temp_suction" 156 | scan_interval: 2 157 | address: 18 158 | unit_of_measurement: °C 159 | slave: !secret lg_heatpump_modbus_slave 160 | input_type: input 161 | 162 | - name: "hp_temp_heatgas" # Heißgastemperatur 163 | unique_id: "hp_modbus.temp_heatgas" 164 | address: 19 165 | unit_of_measurement: °C 166 | slave: !secret lg_heatpump_modbus_slave 167 | input_type: input 168 | 169 | - name: "hp_temp_before_vaporiser" # Dampftemperatur vor Verdampfer 170 | unique_id: "modbus.hp_temp_before_vaporiser" 171 | precision: 1 172 | scan_interval: 10 173 | address: 20 174 | scale: 0.1 175 | device_class: temperature 176 | unit_of_measurement: "°C" 177 | slave: !secret lg_heatpump_modbus_slave 178 | input_type: input 179 | 180 | - name: "hp_temp_after_vaporiser" # Dampftemperatur nach Verdampfer 181 | unique_id: "modbus.hp_temp_after_vaporiser" 182 | precision: 1 183 | scan_interval: 10 184 | address: 21 185 | scale: 0.1 186 | device_class: temperature 187 | unit_of_measurement: "°C" 188 | slave: !secret lg_heatpump_modbus_slave 189 | input_type: input 190 | 191 | - name: "hp_high_pressure" # Dampfdruck Kondensator 192 | unique_id: "hp_modbus.high_pressure" 193 | address: 22 194 | unit_of_measurement: Bar 195 | slave: !secret lg_heatpump_modbus_slave 196 | input_type: input 197 | 198 | - name: "hp_low_pressure" # Dampfdruck Verdampfer 199 | unique_id: "modbus.hp_low_pressure" 200 | address: 23 201 | unit_of_measurement: Bar 202 | slave: !secret lg_heatpump_modbus_slave 203 | input_type: input 204 | 205 | - name: "hp_compressor_rpm" # Kompressordrehzahl 206 | unique_id: "modbus.hp_compressor_rpm" 207 | scale: 60 208 | precision: 0.1 209 | scan_interval: 10 210 | address: 24 211 | slave: !secret lg_heatpump_modbus_slave 212 | unit_of_measurement: U/min 213 | input_type: input 214 | 215 | - name: "hp_product_info" # Produktinfos 216 | unique_id: "modbus.hp_product_info" 217 | scan_interval: 60 218 | address: 9998 219 | slave: !secret lg_heatpump_modbus_slave 220 | input_type: input 221 | 222 | # Holding Register 223 | #------------------------------------------ 224 | 225 | - name: "hp_operation_mode" 226 | unique_id: "modbus.hp_operation_mode" 227 | scan_interval: 60 228 | address: 0 229 | slave: !secret lg_heatpump_modbus_slave 230 | input_type: holding 231 | 232 | - name: "hp_control_method" 233 | unique_id: "modbus.hp_control_method" 234 | scan_interval: 60 235 | address: 1 236 | slave: !secret lg_heatpump_modbus_slave 237 | input_type: holding 238 | 239 | - name: "hp_target_temp_circuit1" #Zieltemperatur HK1 (Heizkörper) 240 | unique_id: "modbus.hp_target_temp_circuit1" 241 | scale: 0.1 242 | precision: 1 243 | scan_interval: 30 244 | address: 2 245 | slave: !secret lg_heatpump_modbus_slave 246 | unit_of_measurement: °C 247 | input_type: holding 248 | 249 | - name: "hp_room_air_temp_circuit1" 250 | unique_id: "modbus.hp_room_air_temp_circuit1" 251 | scale: 0.1 252 | precision: 1 253 | scan_interval: 30 254 | address: 3 # reg 4 255 | slave: !secret lg_heatpump_modbus_slave 256 | unit_of_measurement: "°C" 257 | input_type: holding 258 | 259 | - name: "hp_shift_value_in_auto_mode_circuit1" #Sollwertverschiebung HK1 (Heizkörper) 260 | unique_id: "modbus.hp_shift_value_in_auto_mode_circuit1" 261 | precision: 1 #test 262 | scan_interval: 30 263 | address: 4 264 | #data_type: int16 265 | slave: !secret lg_heatpump_modbus_slave 266 | unit_of_measurement: °C 267 | input_type: holding 268 | 269 | - name: "hp_target_temp_circuit2" #Zieltemperatur HK2 (Fußbodenheizung) 270 | unique_id: "modbus.hp_target_temp_circuit2" 271 | scale: 0.1 272 | precision: 1 273 | scan_interval: 30 274 | address: 5 275 | slave: !secret lg_heatpump_modbus_slave 276 | unit_of_measurement: °C 277 | input_type: holding 278 | 279 | - name: "hp_room_air_temp_circuit2" 280 | unique_id: "modbus.hp_room_air_temp_circuit2" 281 | scale: 0.1 282 | precision: 1 283 | scan_interval: 30 284 | address: 6 # reg 7 285 | slave: !secret lg_heatpump_modbus_slave 286 | unit_of_measurement: "°C" 287 | input_type: holding 288 | 289 | - name: "hp_shift_value_in_auto_mode_circuit2" #Sollwertverschiebung HK2 (Fußbodenheizung) 290 | unique_id: "modbus.hp_shift_value_in_auto_mode_circuit2" 291 | precision: 1 #test 292 | scan_interval: 30 293 | address: 7 294 | #data_type: int16 295 | slave: !secret lg_heatpump_modbus_slave 296 | unit_of_measurement: °C 297 | input_type: holding 298 | 299 | - name: "hp_dhw_target_temp" #DHW Zieltemperatur 300 | unique_id: "modbus.hp_dhw_target_temp" 301 | scale: 0.1 302 | precision: 1 303 | scan_interval: 30 304 | address: 8 305 | slave: !secret lg_heatpump_modbus_slave 306 | unit_of_measurement: °C 307 | input_type: holding 308 | 309 | - name: "hp_energy_state_input_raw" 310 | unique_id: "modbus.hp_energy_state_input_raw" 311 | slave: !secret lg_heatpump_modbus_slave 312 | scan_interval: 10 313 | address: 9 # reg 10 314 | input_type: holding 315 | 316 | # ------------------------------------------------- 317 | switches: 318 | # coil_register (binäre Daten, nur schreiben) 319 | # ------------------------------------------------- 320 | - name: "hp_hauptschalter" # Wärmepumpe an/aus 321 | unique_id: "modbus.hp_hauptschalter" 322 | slave: !secret lg_heatpump_modbus_slave 323 | address: 0 324 | write_type: coil 325 | command_on: 1 326 | command_off: 0 327 | verify: 328 | input_type: coil 329 | address: 0 330 | state_on: 1 331 | state_off: 0 332 | 333 | - name: "hp_dhw" # Warmwasserbereitung an/aus 334 | unique_id: "modbus.hp_dhw" 335 | slave: !secret lg_heatpump_modbus_slave 336 | address: 1 337 | write_type: coil 338 | command_on: 1 339 | command_off: 0 340 | verify: 341 | input_type: coil 342 | address: 1 343 | state_on: 1 344 | state_off: 0 345 | 346 | - name: "hp_silent_mode" # Ruhemodus an/aus 347 | unique_id: "modbus.hp_silent_mode" 348 | slave: !secret lg_heatpump_modbus_slave 349 | address: 2 350 | write_type: coil 351 | command_on: 1 352 | command_off: 0 353 | verify: 354 | input_type: coil 355 | address: 2 356 | state_on: 1 357 | state_off: 0 358 | 359 | - name: "hp_dhw_desinfection_mode" # Desinfektionsmodus an/aus 360 | unique_id: "modbus.hp_dhw_desinfection_mode" 361 | slave: !secret lg_heatpump_modbus_slave 362 | address: 3 363 | write_type: coil 364 | command_on: 1 365 | command_off: 0 366 | verify: 367 | input_type: coil 368 | address: 3 369 | state_on: 1 370 | state_off: 0 371 | 372 | # ----------------------------------------- 373 | binary_sensors: 374 | # discrete_input (binäre Daten, nur lesen) 375 | # ----------------------------------------- 376 | - name: "hp_water_flow_status" 377 | unique_id: "modbus.hp_water_flow_status" 378 | scan_interval: 30 379 | address: 0 380 | slave: !secret lg_heatpump_modbus_slave 381 | input_type: discrete_input 382 | 383 | - name: "hp_water_pump_status" 384 | unique_id: "modbus.hp_water_pump_status" 385 | scan_interval: 30 386 | address: 1 387 | slave: !secret lg_heatpump_modbus_slave 388 | input_type: discrete_input 389 | 390 | - name: "hp_ext_water_pump_status" 391 | unique_id: "modbus.hp_ext_water_pump_status" 392 | scan_interval: 30 393 | address: 2 394 | slave: !secret lg_heatpump_modbus_slave 395 | input_type: discrete_input 396 | 397 | - name: "hp_compressor_status" 398 | unique_id: "modbus.hp_compressor_status" 399 | scan_interval: 30 400 | address: 3 401 | slave: !secret lg_heatpump_modbus_slave 402 | input_type: discrete_input 403 | 404 | - name: "hp_defrosting_status" 405 | unique_id: "modbus.hp_defrosting_status" 406 | scan_interval: 30 407 | address: 4 408 | slave: !secret lg_heatpump_modbus_slave 409 | input_type: discrete_input 410 | 411 | - name: "hp_dhw_heating_status" 412 | unique_id: "modbus.hp_dhw_heating_status" 413 | scan_interval: 30 414 | address: 5 415 | slave: !secret lg_heatpump_modbus_slave 416 | input_type: discrete_input 417 | 418 | - name: "hp_dhw_tank_desinfection_status" 419 | unique_id: "modbus.hp_dhw_tank_desinfection_status" 420 | scan_interval: 30 421 | address: 6 422 | slave: !secret lg_heatpump_modbus_slave 423 | input_type: discrete_input 424 | 425 | - name: "hp_silent_mode_status" 426 | unique_id: "modbus.hp_silent_mode_status" 427 | scan_interval: 30 428 | address: 7 429 | slave: !secret lg_heatpump_modbus_slave 430 | input_type: discrete_input 431 | 432 | - name: "hp_cooling_status" 433 | unique_id: "modbus.hp_cooling_status" 434 | scan_interval: 30 435 | address: 8 436 | slave: !secret lg_heatpump_modbus_slave 437 | input_type: discrete_input 438 | 439 | - name: "hp_solar_pump_status" 440 | unique_id: "modbus.hp_solar_pump_status" 441 | scan_interval: 30 442 | address: 9 # register #10 443 | slave: !secret lg_heatpump_modbus_slave 444 | input_type: discrete_input 445 | 446 | - name: "hp_backup_heater_step1_status" 447 | unique_id: "modbus.hp_backup_heater_step1_status" 448 | scan_interval: 30 449 | address: 10 450 | slave: !secret lg_heatpump_modbus_slave 451 | input_type: discrete_input 452 | 453 | - name: "hp_backup_heater_step2_status" 454 | unique_id: "modbus.hp_backup_heater_step2_status" 455 | scan_interval: 30 456 | address: 11 457 | slave: !secret lg_heatpump_modbus_slave 458 | input_type: discrete_input 459 | 460 | - name: "hp_dhw_boost_heater_status" 461 | unique_id: "modbus.hp_dhw_boost_heater_status" 462 | scan_interval: 30 463 | address: 12 464 | slave: !secret lg_heatpump_modbus_slave 465 | input_type: discrete_input 466 | 467 | - name: "hp_error_status" 468 | unique_id: "modbus.hp_error_status" 469 | scan_interval: 30 470 | address: 13 471 | slave: !secret lg_heatpump_modbus_slave 472 | input_type: discrete_input 473 | 474 | - name: "hp_emergency_operation_available_space_heating/cooling" 475 | unique_id: "modbus.hp_emergency_operation_available_space_heating_cooling" 476 | scan_interval: 30 477 | address: 14 478 | slave: !secret lg_heatpump_modbus_slave 479 | input_type: discrete_input 480 | 481 | - name: "hp_emergency_operation_available_dhw" 482 | unique_id: "modbus.hp_emergency_operation_available_dhw" 483 | scan_interval: 30 484 | address: 15 485 | slave: !secret lg_heatpump_modbus_slave 486 | input_type: discrete_input 487 | 488 | - name: "hp_mix_pump_status" 489 | unique_id: "modbus.hp_mix_pump_status" 490 | scan_interval: 30 491 | address: 16 492 | slave: !secret lg_heatpump_modbus_slave 493 | input_type: discrete_input 494 | 495 | input_number: 496 | # Input Number 497 | # ----------------------------------------- 498 | hp_shift_value_in_auto_mode_circuit1: 499 | name: "Set HP Sollwertverschiebung im AI Modus - HK1 (Heizkörper)" 500 | min: -5 501 | max: 5 502 | step: 1 503 | 504 | hp_shift_value_in_auto_mode_circuit2: 505 | name: "Set HP Sollwertverschiebung im AI Modus - HK2 (Fußbodenheizung)" 506 | min: -5 507 | max: 5 508 | step: 1 509 | 510 | hp_hk1_target_temperatur: 511 | name: "Soll Temperatur HK1 #Zieltemperatur HK1 Heizkörper" 512 | min: 30 513 | max: 50 514 | step: 1 515 | 516 | hp_hk2_target_temperatur: 517 | name: "Soll Temperatur HK2 #Zieltemperatur HK2Fußbodenheizung" 518 | min: 20 519 | max: 40 520 | step: 1 521 | 522 | hp_dhw_target_temperatur: 523 | name: "Soll Temperatur DHW" 524 | min: 45 525 | max: 60 526 | step: 1 527 | 528 | input_select: 529 | # Input Select 530 | # ----------------------------------------- 531 | hp_set_operation_mode: 532 | name: "Selector Heatpump Operation Mode" 533 | options: 534 | - "Kühlen" 535 | - "Heizen" 536 | - "Auto" 537 | 538 | hp_set_control_method: 539 | name: "Selector Heatpump Control Method" 540 | options: 541 | - "Wasserauslasstemp. Steuerung" 542 | - "Wassereinlasstemp. Steuerung" 543 | - "Raumluftsteuerung" 544 | 545 | template: 546 | # Template sensors for better readability 547 | #----------------------------------------- 548 | - binary_sensor: 549 | - name: "HP Energy State - Nicht verwenden" 550 | unique_id: hp_energy_state_nicht_verwenden" 551 | state: > 552 | {{ states('sensor.hp_energy_state_input_raw')|int(default=0) == 0 }} 553 | 554 | - name: "HP Energy State - Erzwungen Aus" 555 | unique_id: hp_energy_state_erzwungen_aus" 556 | state: > 557 | {{ states('sensor.hp_energy_state_input_raw')|int(default=0) == 1 }} 558 | 559 | - name: "HP Energy State - Normalbetrieb" 560 | unique_id: hp_energy_state_normalbetrieb" 561 | state: > 562 | {{ states('sensor.hp_energy_state_input_raw')|int(default=0) == 2 }} 563 | 564 | - name: "HP Energy State - Ein-Empfehlung" 565 | unique_id: hp_energy_state_ein_empfehlung" 566 | state: > 567 | {{ states('sensor.hp_energy_state_input_raw')|int(default=0) == 3 }} 568 | 569 | - name: "HP Energy State - Ein-Befehl" 570 | unique_id: "hp_energy_state_ein_befehl" 571 | state: > 572 | {{ states('sensor.hp_energy_state_input_raw')|int(default=0) == 4 }} 573 | 574 | - name: "HP Energy State - Ein-Befehl Schritt 2" 575 | unique_id: hp_energy_state_ein_befehl_schritt_2" 576 | state: > 577 | {{ states('sensor.hp_energy_state_input_raw')|int(default=0) == 5 }} 578 | 579 | - name: "HP Energy State - Ein-Empfehlung Schritt 1" 580 | unique_id: hp_energy_state_ein_empfehlung_befehl_schritt_1" 581 | state: > 582 | {{ states('sensor.hp_energy_state_input_raw')|int(default=0) == 6 }} 583 | 584 | - name: "HP Energy State - Energiesparmodus" 585 | unique_id: hp_energy_state_ein_energiesparmodus" 586 | state: > 587 | {{ states('sensor.hp_energy_state_input_raw')|int(default=0) == 7 }} 588 | 589 | - name: "HP Energy State - Superenergiesparmodus" 590 | unique_id: hp_energy_state_ein_superenergiesparmodus" 591 | state: > 592 | {{ states('sensor.hp_energy_state_input_raw')|int(default=0) == 8 }} 593 | 594 | # --------------------------------------------------------------------------------------------------------------- 595 | # Automations: Write modbus registers on input changes via GUI 596 | # note: If you change a value by the sliders, it will take up to 60 seconds until the state variables are updated 597 | # --------------------------------------------------------------------------------------------------------------- 598 | 599 | automation: 600 | ### Input Select Operation Mode ### 601 | #------------------------------------------------------------------------------- 602 | - id: "hp_automation_operation_mode_modbus_update" 603 | alias: "[Heatpump] Operation Mode Modbus Update" 604 | description: "Select Operation Mode of Heatpump - send via Modbus" 605 | triggers: 606 | - trigger: state 607 | entity_id: 608 | - input_select.hp_set_operation_mode 609 | condition: [] 610 | variables: 611 | kuehlen: 0 612 | auto: 3 613 | heizen: 4 614 | action: 615 | - action: modbus.write_register 616 | data: 617 | hub: lg_heatpump 618 | slave: !secret lg_heatpump_modbus_slave 619 | address: 0 620 | value: >- 621 | {% if is_state('input_select.hp_set_operation_mode', 'Kühlen') %} {{kuehlen}} 622 | {% elif is_state('input_select.hp_set_operation_mode', 'Heizen') %} {{heizen}} 623 | {% else %} 624 | {{auto}} 625 | {% endif %} 626 | mode: single 627 | 628 | - id: "hp_automation_operation_mode_input_select_update" 629 | alias: "[Heatpump] Operation Mode InputSelect Update" 630 | description: "Select Operation Mode of Heatpump - Read from State" 631 | triggers: 632 | - trigger: state 633 | entity_id: 634 | - sensor.hp_operation_mode 635 | condition: [] 636 | action: 637 | - action: input_select.select_option 638 | target: 639 | entity_id: input_select.hp_set_operation_mode 640 | data: 641 | option: > 642 | {% if is_state('sensor.hp_operation_mode', '3') %} 643 | Auto 644 | {% elif is_state('sensor.hp_operation_mode', '4') %} 645 | Heizen 646 | {% else %} 647 | Kühlen 648 | {% endif %} 649 | mode: single 650 | 651 | ### Input Select Control Mode ### 652 | #------------------------------------------------------------------------------- 653 | 654 | - id: "hp_automation_control_method_modbus_update" 655 | alias: "[Heatpump] Control Method Modbus Update" 656 | description: "Select Control Method of Heatpump - send via Modbus" 657 | triggers: 658 | - trigger: state 659 | entity_id: 660 | - input_select.hp_set_control_method 661 | condition: [] 662 | variables: 663 | auslass: 0 664 | einlass: 1 665 | raumluft: 2 666 | action: 667 | - action: modbus.write_register 668 | data_template: 669 | hub: lg_heatpump 670 | slave: !secret lg_heatpump_modbus_slave 671 | address: 1 672 | value: >- 673 | {% if is_state('input_select.hp_set_control_method', 'Wasserauslasstemp. Steuerung') %} 674 | {{auslass}} 675 | {% elif is_state('input_select.hp_set_control_method', 'Wassereinlasstemp. Steuerung') %} 676 | {{einlass}} 677 | {% else %} 678 | {{raumluft}} 679 | {% endif %} 680 | mode: single 681 | 682 | - id: "hp_automation_control_method_input_select_update" 683 | alias: "[Heatpump] Control Method InputSelect Update" 684 | description: "Select Control Method of Heatpump - Read from State" 685 | triggers: 686 | - trigger: state 687 | entity_id: 688 | - sensor.hp_control_method 689 | condition: [] 690 | action: 691 | - action: input_select.select_option 692 | target: 693 | entity_id: input_select.hp_set_control_method 694 | data: 695 | option: > 696 | {% if is_state('sensor.hp_control_method', '0') %} 697 | Wasserauslasstemp. Steuerung 698 | {% elif is_state('sensor.hp_control_method', '1') %} 699 | Wassereinlasstemp. Steuerung 700 | {% else %} 701 | Raumluftsteuerung 702 | {% endif %} 703 | mode: single 704 | 705 | ### Sollwertverschiebung von Heizkreis 1 (Heizkörper)### 706 | #------------------------------------------------------------------------------- 707 | 708 | - id: "hp_automation_set_shift_value_in_auto_mode_circuit1_modbus_update" 709 | alias: "hp_automation_set_shift_value_in_auto_mode_circuit1_modbus_update" 710 | description: "Änderung der Vorlauftemperatur HK1 im AI Modus auf Modbus schreiben" 711 | triggers: 712 | - trigger: state 713 | entity_id: 714 | - input_number.hp_shift_value_in_auto_mode_circuit1 715 | condition: [] 716 | action: 717 | - action: modbus.write_register 718 | data_template: 719 | hub: lg_heatpump 720 | slave: !secret lg_heatpump_modbus_slave 721 | address: 4 722 | value: > 723 | {% if states('input_number.hp_shift_value_in_auto_mode_circuit1') | int(default=0) < 0 %} 724 | {{states('input_number.hp_shift_value_in_auto_mode_circuit1') | int + 65536 }} 725 | {% else %} 726 | {{states('input_number.hp_shift_value_in_auto_mode_circuit1') | int }} 727 | {% endif %} 728 | mode: single 729 | 730 | - id: "hp_automation_set_shift_value_in_auto_mode_circuit1_input_slider_update" 731 | alias: "hp_automation_set_shift_value_in_auto_mode_circuit1_input_slider_update" 732 | description: "Änderung der Vorlauftemperatur HK1 im AI Modus auf Input Slider schreiben" 733 | triggers: 734 | - trigger: state 735 | entity_id: 736 | - sensor.hp_shift_value_in_auto_mode_circuit1 737 | condition: [] 738 | action: 739 | - action: input_number.set_value 740 | target: 741 | entity_id: input_number.set_hp_shift_value_in_auto_mode_circuit1 742 | data: 743 | value: "{{ states('sensor.hp_shift_value_in_auto_mode_circuit1') }}" 744 | mode: single 745 | 746 | ### Sollwertverschiebung von Heizkreis 2 (Fußbodenheizung)### 747 | #------------------------------------------------------------------------------- 748 | 749 | - id: "hp_automation_set_shift_value_in_auto_mode_circuit2_modbus_update" 750 | alias: "hp_automation_set_shift_value_in_auto_mode_circuit2_modbus_update" 751 | description: "Änderung der Vorlauftemperatur HK2 im AI Modus auf Modbus schreiben" 752 | triggers: 753 | - trigger: state 754 | entity_id: 755 | - input_number.hp_shift_value_in_auto_mode_circuit2 756 | condition: [] 757 | action: 758 | - action: modbus.write_register 759 | data_template: 760 | hub: lg_heatpump 761 | slave: !secret lg_heatpump_modbus_slave 762 | address: 7 763 | value: > 764 | {% if states('input_number.hp_shift_value_in_auto_mode_circuit2') | int(default=0) < 0 %} 765 | {{states('input_number.hp_shift_value_in_auto_mode_circuit2') | int + 65536 }} 766 | {% else %} 767 | {{states('input_number.hp_shift_value_in_auto_mode_circuit2') | int }} 768 | {% endif %} 769 | mode: single 770 | 771 | - id: "hp_automation_set_shift_value_in_auto_mode_circuit2_input_slider_update" 772 | alias: "hp_automation_set_shift_value_in_auto_mode_circuit2_input_slider_update" 773 | description: "Änderung der Vorlauftemperatur HK2 im AI Modus auf Input Slider schreiben" 774 | triggers: 775 | - trigger: state 776 | entity_id: 777 | - sensor.hp_shift_value_in_auto_mode_circuit2 778 | condition: [] 779 | action: 780 | - action: input_number.set_value 781 | target: 782 | entity_id: input_number.hp_shift_value_in_auto_mode_circuit2 783 | data: 784 | value: "{{ states('sensor.hp_shift_value_in_auto_mode_circuit2') }}" 785 | mode: single 786 | 787 | ### HK1 Solltemperatur ### 788 | #------------------------------------------------------------------------------- 789 | 790 | - id: "hp_automation_set_target_temperatur_hk1_modbus_update" 791 | alias: "hp_automation_set_target_temperatur_hk1_modbus_update" 792 | description: "Änderung der HK1 Solltemperatur auf Modbus schreiben" 793 | triggers: 794 | - trigger: state 795 | entity_id: 796 | - input_number.hp_hk1_target_temperatur 797 | condition: [] 798 | action: 799 | - action: modbus.write_register 800 | data_template: 801 | hub: lg_heatpump 802 | slave: !secret lg_heatpump_modbus_slave 803 | address: 2 804 | value: "{{ states('input_number.hp_hk1_target_temperatur') |float *10 | int}}" 805 | mode: single 806 | 807 | - id: "hp_automation_set_target_temperatur_hk1_input_slider_update" 808 | alias: "hp_automation_set_target_temperatur_hk1_input_slider_update" 809 | description: "Änderung der HK1 Solltemperatur auf Input Slider schreiben" 810 | triggers: 811 | - trigger: state 812 | entity_id: 813 | - sensor.hp_target_temp_circuit1 814 | condition: [] 815 | action: 816 | - action: input_number.set_value 817 | target: 818 | entity_id: input_number.hp_hk1_target_temperatur 819 | data: 820 | value: "{{ states('sensor.hp_target_temp_circuit1') }}" 821 | mode: single 822 | 823 | ### HK2 Solltemperatur ### 824 | #------------------------------------------------------------------------------- 825 | 826 | - id: "hp_automation_set_target_temperatur_hk2_modbus_update" 827 | alias: "hp_automation_set_target_temperatur_hk2_modbus_update" 828 | description: "Änderung der HK2 Solltemperatur auf Modbus schreiben" 829 | triggers: 830 | - trigger: state 831 | entity_id: 832 | - input_number.hp_hk2_target_temperatur 833 | condition: [] 834 | action: 835 | - action: modbus.write_register 836 | data_template: 837 | hub: lg_heatpump 838 | slave: !secret lg_heatpump_modbus_slave 839 | address: 5 840 | value: "{{ states('input_number.hp_hk2_target_temperatur') |float *10 | int}}" 841 | mode: single 842 | 843 | - id: "hp_automation_set_target_temperatur_hk2_input_slider_update" 844 | alias: "hp_automation_set_target_temperatur_hk2_input_slider_update" 845 | description: "Änderung der HK2 Solltemperatur auf Input Slider schreiben" 846 | triggers: 847 | - trigger: state 848 | entity_id: 849 | - sensor.hp_target_temp_circuit2 850 | condition: [] 851 | action: 852 | - action: input_number.set_value 853 | target: 854 | entity_id: input_number.hp_hk2_target_temperatur 855 | data: 856 | value: "{{ states('sensor.hp_target_temp_circuit2') }}" 857 | mode: single 858 | 859 | ### DHW Solltemperatur ### 860 | #------------------------------------------------------------------------------- 861 | 862 | - id: "hp_automation_set_target_temperatur_modbus_update" 863 | alias: "hp_automation_set_target_temperatur_modbus_update" 864 | description: "Änderung der DHW Solltemperatur auf Modbus schreiben" 865 | triggers: 866 | - trigger: state 867 | entity_id: 868 | - input_number.hp_dhw_target_temperatur 869 | condition: [] 870 | action: 871 | - action: modbus.write_register 872 | data_template: 873 | hub: lg_heatpump 874 | slave: !secret lg_heatpump_modbus_slave 875 | address: 8 876 | value: "{{ states('input_number.hp_dhw_target_temperatur') |float *10 | int}}" 877 | mode: single 878 | 879 | - id: "hp_automation_set_target_temperatur_input_slider_update" 880 | alias: "hp_automation_set_target_temperatur_input_slider_update" 881 | description: "Änderung der DHW Solltemperatur auf Input Slider schreiben" 882 | triggers: 883 | - trigger: state 884 | entity_id: 885 | - sensor.hp_dhw_target_temp 886 | condition: [] 887 | action: 888 | - action: input_number.set_value 889 | target: 890 | entity_id: input_number.hp_dhw_target_temperatur 891 | data: 892 | value: "{{ states('sensor.dhw_target_temp') }}" 893 | mode: single 894 | --------------------------------------------------------------------------------