blueprint: name: Heating Disable Schedule domain: automation description: > # Heating Disable Schedule **Version: 1.0** A time schedule to disable heating ## Requirements The manual operation time should be set at 30 min, this is done by setting 4 in WPU 5G heatpump settings. If for whatever reason the WPU does not receive the manual operation commands after these minutes, it wil go back to automatic mode. input: mqtt_topic: name: MQTT Command Topic description: The command topic this blueprint publishes its commands on default: itho/cmd schedule: name: Schedule description: A time schedule to disable heating selector: entity: domain: - schedule multiple: false schedule_active: name: Schedule active description: This must be a switch/input_boolean helper. With this you can disable the schedule without removing all scheduled parts. selector: entity: domain: - input_boolean multiple: false heating_disabled: name: Heating Disabled description: This must be a switch/input_boolean helper. Changed by the schedule. With this you can manually change the current state. selector: entity: domain: - input_boolean multiple: false trigger: - platform: state entity_id: !input schedule id: schedule_changed - platform: state entity_id: !input heating_disabled id: heating_disabled_changed - platform: state entity_id: !input schedule_active id: schedule_active_changed - platform: time_pattern minutes: /5 id: every_5_min variables: schedule: !input schedule action: - choose: - alias: Schedule changed, change if schedule active conditions: - condition: trigger id: - schedule_changed - condition: template value_template: "{{ trigger.to_state.state in ['on', 'off'] }}" - condition: state entity_id: !input schedule_active state: "on" sequence: - service: input_boolean.turn_{{ trigger.to_state.state }} data: {} target: entity_id: !input heating_disabled - alias: Schedule active off conditions: - condition: trigger id: - schedule_active_changed - condition: state entity_id: !input schedule_active state: "off" sequence: - service: input_boolean.turn_off data: {} target: entity_id: !input heating_disabled - alias: Schedule active on conditions: - condition: trigger id: - schedule_active_changed - condition: state entity_id: !input schedule_active state: "on" sequence: - service: input_boolean.turn_{{ states(schedule) }} data: {} target: entity_id: !input heating_disabled - alias: Heating disabled on, sending mqtt message conditions: - condition: trigger id: - heating_disabled_changed - every_5_min - condition: state entity_id: !input heating_disabled state: "on" sequence: - service: mqtt.publish data: payload: >- { "manual_operation_index": 30, "manual_operation_datatype": 0, "manual_operation_value": 0, "manual_operation_checked": 1 } retain: true topic: !input mqtt_topic - alias: Heating disabled off, sending mqtt message conditions: - condition: trigger id: - heating_disabled_changed - condition: state entity_id: !input heating_disabled state: "off" sequence: - repeat: count: 3 sequence: - delay: hours: 0 minutes: 0 seconds: 1 milliseconds: 0 - service: mqtt.publish data: payload: >- { "manual_operation_index": 30, "manual_operation_datatype": 0, "manual_operation_value": 0, "manual_operation_checked": 0 } retain: true topic: !input mqtt_topic mode: queued trace: stored_traces: 5