# Then you can program it. It'll fail to reset, just release IO0 and power cycle.
substitutions:
- name: faikin3
+ name: faikin4
+ pump: "2"
# heatpump heating/cooling switch
# available modes: HEAT_ROOM_TEMP, HEAT_FLOW_TEMP, HEAT_COMPENSATION_CURVE, COOL_ROOM_TEMP, COOL_FLOW_TEMP
default_heating_switch_mode: HEAT_COMPENSATION_CURVE
refresh: always
files: [
confs/base.yaml,
- #confs/esp32s3.yaml, # confs/esp32.yaml, for regular board
confs/zone1.yaml,
- ## enable if you want to use zone 2
- #confs/zone2.yaml,
- ## enable label language file
confs/ecodan-labels-en.yaml,
- #confs/ecodan-labels-nl.yaml,
- #confs/ecodan-labels-it.yaml,
- #confs/server-control.yaml,
- #confs/debug.yaml,
]
light:
# update_interval: 30s
# rx_pin: GPIO34
# tx_pin: GPIO48
+
+sensor:
+ - platform: mqtt_subscribe
+ id: input_power
+ topic: power-ashp${pump}/sensor/heat_pump_${pump}_circuit_power/state
+ unit_of_measurement: W
+ on_value:
+ then:
+ lambda: |-
+ double p_in = x;
+ double p_out = id(computed_output_power).state;
+ if (p_in > 0 && p_out > 0)
+ id(cop).publish_state(p_out * 100000.0 / p_in);
+ else
+ id(cop).publish_state(NAN);
+ - platform: combination
+ type: linear
+ id: dup_output_power
+ sources:
+ - source: computed_output_power
+ coeffecient: 1
+ on_value:
+ then:
+ lambda: |-
+ double p_in = id(input_power).state;
+ double p_out = x;
+ if (p_in > 0 && p_out > 0)
+ id(cop).publish_state(p_out * 100000.0 / p_in);
+ else
+ id(cop).publish_state(NAN);
+
+ - platform: template
+ id: cop
+ name: "Computed COP"
+ unit_of_measurement: "%"
+ accuracy_decimals: 0
+ state_class: measurement
+ filters:
+ sliding_window_moving_average:
+ window_size: 2