Intelligent Heating Pilot compatibility #93
Replies: 6 comments 8 replies
-
|
I had a quick look and it seems an amazing project, I've no idea where to start figuring out how to integrate it though. I'll keep this open and see if others have thoughts on how it could be done in the future. |
Beta Was this translation helpful? Give feedback.
-
|
I took a look at scheduler_reader.py and it looks like it only parses the attributes of the switch entity (see def _extract_timeslot_data) I created a schedule in HACS Scheduler and here is what the attribute of the switch it creates looks like: The switch states corresponds to the schedule state. I originally commented on #89 but moved it to a discussion because I wasn't sure than a new entity would solve this, but it might do 🙂 |
Beta Was this translation helpful? Give feedback.
-
|
I think it should now work with IHP, if you could test I'd appreciate it: |
Beta Was this translation helpful? Give feedback.
-
|
Hey @kneave, At least, it's able to read the datas correctly. Now I'll see if it applies the correct temperature at the right time! |
Beta Was this translation helpful? Give feedback.
-
|
Unfortunately, IHP can't work with climate-scheduler for now because a call to scheduler.run_action is hard coded in IHP :( |
Beta Was this translation helpful? Give feedback.
-
|
With the recent addition of the alias: IHP script
description: ""
fields:
climate_scheduler_switch:
selector:
entity:
filter:
- domain: switch
name: climate_scheduler_switch
required: true
climate_scheduler_climate:
selector:
entity:
filter:
- domain: climate
name: climate_scheduler_climate
required: true
ihp_anticipated_start_time:
selector:
entity:
filter:
- domain: sensor
name: ihp_anticipated_start_time
required: true
sequence:
- variables:
next_slot: "{{ state_attr(climate_scheduler_switch,'next_slot') }}"
climate_entity: >-
{{ state_attr(climate_scheduler_switch,'actions')[next_slot].entity_id
}}
- delay:
hours: 0
minutes: 1
seconds: 0
milliseconds: 0
alias: Wait for climate_scheduler to update advance status
- action: climate_scheduler.get_advance_status
metadata: {}
data:
schedule_id: "{{ climate_entity }}"
response_variable: advance_status
- condition: template
value_template: "{{ is_state(climate_scheduler_switch,'on') }}"
alias: Is schedule enabled?
- alias: Next schedule is heating
condition: template
value_template: >-
{{ state_attr(climate_scheduler_climate, 'temperature')
<
state_attr(climate_scheduler_switch,'actions')[next_slot].data.temperature
}}
enabled: true
- action: intelligent_heating_pilot.calculate_anticipated_start_time
metadata: {}
data:
entity_id: "{{ ihp_anticipated_start_time }}"
target_time: "{{ state_attr(climate_scheduler_switch, 'next_trigger') }}"
target_temp: >-
{{
state_attr(climate_scheduler_switch,'actions')[next_slot].data.temperature
}}
enabled: true
response_variable: heating_calc
- choose:
- conditions:
- condition: template
value_template: "{{ not advance_status.is_active }}"
alias: Advance_status is not active
sequence:
- alias: Anticipated time < scheduled time
condition: template
value_template: >-
{{ as_datetime(heating_calc.anticipated_start_time) <
as_datetime(heating_calc.target_time) }}
- condition: template
value_template: "{{ as_datetime(heating_calc.anticipated_start_time) <= now() }}"
alias: Calculated anticipated start time < now
- action: climate_scheduler.advance_schedule
metadata: {}
data:
schedule_id: "{{ climate_entity }}"
- conditions:
- alias: Advance_status is active
condition: template
value_template: "{{ advance_status.is_active }}"
- condition: template
value_template: >-
{{ as_datetime(heating_calc.anticipated_start_time) > (now() +
timedelta(hours = 1)) }}
alias: Calculated anticipated start time is in a long time
sequence:
- action: climate_scheduler.cancel_advance
metadata: {}
data:
schedule_id: "{{ climate_entity }}"
alias: Advance is active but calculated start time is in a long time
mode: parallel
max: 20
Which is then triggered by this automation: alias: IHP Bureau
description: ""
triggers:
- trigger: time_pattern
minutes: /10
enabled: true
conditions: []
actions:
- action: script.ihp_script
metadata: {}
data:
climate_scheduler_switch: switch.schedule_thermostat_bureau
climate_scheduler_climate: climate.climate_scheduler_climate_schedule_thermostat_bureau
ihp_anticipated_start_time: sensor.ihp_bureau_anticipated_start_time
mode: singleIt's kind of a mess, but I think it's working. I'll test it in the next days :) |
Beta Was this translation helpful? Give feedback.


Uh oh!
There was an error while loading. Please reload this page.
-
Hi!
I don't know if it's possible, but it would be great if Climate Scheduler worked with Intelligent Heating Pilot (https://github.com/RastaChaum/Intelligent-Heating-Pilot/tree/main)
IHP uses HACS Scheduler switches, do you think it would be possible for Climate Scheduler interface with it?
Beta Was this translation helpful? Give feedback.
All reactions