Closed wifi75 closed 2 months ago
I think you will have to figure out this one by yourself. I have split configuration files in multiple directories, let me explain:
File: /sensors/heat_pump.yaml
# Main sensor with all the data
- platform: rest
name: Kronoterm heat pump
unique_id: kronoterm_heat_pump
scan_interval: 60
resource: http://ip-or-host:8555/hp_info/info_summary
value_template: "{{ value_json.data.system_info.working_function }}"
json_attributes_path: '$.data'
json_attributes:
- hp_id
- location_name
- user_level
- heating_loop_names
- alarms
- system_info
- heating_loop_1
- heating_loop_2
File: custom_templates.yaml
- sensor:
# System info
- name: "Heat pump id"
unique_id: heat_pump_id
state: "{{ state_attr('sensor.kronoterm_heat_pump', 'hp_id') }}"
- name: "Heat pump location name"
unique_id: heat_pump_location_name
state: "{{ state_attr('sensor.kronoterm_heat_pump', 'location_name') }}"
- name: "Heat pump room temperature"
unique_id: heat_pump_room_temperature
state: "{{ state_attr('sensor.kronoterm_heat_pump', 'system_info').room_temperature }}"
unit_of_measurement: °C
device_class: temperature
state_class: measurement
- name: "Heat pump outlet temperature"
unique_id: heat_pump_outlet_temperature
state: "{{ state_attr('sensor.kronoterm_heat_pump', 'system_info').outlet_temperature }}"
unit_of_measurement: °C
device_class: temperature
state_class: measurement
- name: "Heat pump outside temperature"
unique_id: heat_pump_outside_temperature
state: "{{ state_attr('sensor.kronoterm_heat_pump', 'system_info').outside_temperature }}"
unit_of_measurement: °C
device_class: temperature
state_class: measurement
- name: "Sanitary water temperature"
unique_id: sanitary_water_temperature
state: "{{ state_attr('sensor.kronoterm_heat_pump', 'system_info').sanitary_water_temperature }}"
unit_of_measurement: °C
device_class: temperature
state_class: measurement
- name: "Heating system pressure"
unique_id: heat_pump_heating_system_pressure
state: "{{ state_attr('sensor.kronoterm_heat_pump', 'system_info').heating_system_pressure }}"
unit_of_measurement: bar
...
..
.
File: configuration.yaml
template: !include custom_templates.yaml
sensor: !include_dir_merge_list ./sensors
rest_command:
hp_set_mode_loop_1_on:
url: http://ip-or-host:8555/hp_control/set_heating_loop_mode
method: POST
payload: '{"mode": "ON", "heating_loop": 1}'
content_type: 'application/json'
hp_set_mode_loop_1_off:
url: http://ip-or-host:8555/hp_control/set_heating_loop_mode
method: POST
payload: '{"mode": "OFF", "heating_loop": 1}'
content_type: 'application/json'
hp_set_mode_loop_1_auto:
url: http://ip-or-host:8555/hp_control/set_heating_loop_mode
method: POST
payload: '{"mode": "AUTO", "heating_loop": 1}'
content_type: 'application/json'
hp_set_mode_loop_2_on:
url: http://ip-or-host:8555/hp_control/set_heating_loop_mode
method: POST
payload: '{"mode": "ON", "heating_loop": 2}'
content_type: 'application/json'
hp_set_mode_loop_2_off:
url: http://ip-or-host:8555/hp_control/se
...
..
.
So some tinkering will be necessary I think this will get you started.
my configuration now it is as below:
group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
switch: !include switch.yaml
light: !include light.yaml
media_player: !include media_player.yaml
cover: !include cover.yaml
climate: !include climate.yaml
sensor: !include sensors.yaml
binary_sensor: !include binary_sensor.yaml
homeassistant:
customize: !include customize.yaml
customize_glob: !include customize_glob.yaml
packages: !include_dir_named packages
how i can add this ?
template: !include custom_templates.yaml sensor: !include_dir_merge_list ./sensors
could i copy all my yaml files into the package directory, just like i do with my other yaml files?
You could paste from "my" /sensors/heat_pump.yaml
to your sensors.yaml
,
and add the
template: !include custom_templates.yaml`
under your other includes.
Make sure you don't have duplicate !includes
!
I don't know how you have set up your system so I can't tell you a lot more.
I don't know about packages, never used them.
can you post your HA dashboard for kronoterm pump please?
oh yes thank you!!!
but this what is it for? you also have nothing that recalls this code..
rest_command:
hp_set_mode_loop_1_on:
url: http://192.168.1.131:8555/hp_control/set_heating_loop_mode
method: POST
payload: '{"mode": "ON", "heating_loop": 1}'
content_type: 'application/json'
hp_set_mode_loop_1_off:
url: http://192.168.1.131/hp_control/set_heating_loop_mode
method: POST
payload: '{"mode": "OFF", "heating_loop": 1}'
content_type: 'application/json'
hp_set_mode_loop_1_auto:
url: http://192.168.1.131/hp_control/set_heating_loop_mode
method: POST
payload: '{"mode": "AUTO", "heating_loop": 1}'
content_type: 'application/json'
hp_set_mode_loop_2_on:
url: http://192.168.1.131:8555/hp_control/set_heating_loop_mode
method: POST
payload: '{"mode": "ON", "heating_loop": 2}'
content_type: 'application/json'
hp_set_mode_loop_2_off:
url: http://192.168.1.131:8555/hp_control/se
There is a automation that triggers on input_number.heat_pump_set_temperature
change redme
There is a automation that triggers on
input_number.heat_pump_set_temperature
change redme
I don't understand this one.. can you give me a practical example?
When you set helper input_number.heat_pump_set_temperature
to a new value (e.g from 22 to 23°C) automation alias: HP_set_room_temperature
detects the change (look at the trigger:
) and calls rest_command.hp_set_temperature
to set new temperature.
hello i created the automation as below: but i cant make it work, i didnt understand what to add in the HA dashboard.
You add input_number.heat_pump_set_temperature
to your dashboard.
hello below your template:
template: