blueprint: name: AirCon description: Stream photos from security camera domain: script input: power: name: Power description: Aircon Smart Power Plug selector: entity: domain: switch temperature: name: Temperature description: Temperature sensor selector: entity: domain: sensor device_class: temperature cold_temp: name: Cold Temp description: Temperature threshold to turn on heating default: 16 selector: number: min: 8 max: 20 unit_of_measurement: C hot_temp: name: Hot Temp description: Temperature threshold to turn on cooling default: 20 selector: number: min: 20 max: 36 unit_of_measurement: C cool_scene: name: Cool Scene description: Cooling scene of Aircon selector: entity: domain: scene heat_scene: name: Heat Scene description: Warming scene of Aircon selector: entity: domain: scene off_scene: name: Off Scene description: Off scene of Aircon selector: entity: domain: scene confirm: name: Confirm description: Confirmation script default: [] selector: action: variables: temp: !input temperature cold: !input cold_temp hot: !input hot_temp alias: AirCon sequence: - if: - condition: state entity_id: !input power state: 'on' then: - service: scene.turn_on target: entity_id: !input off_scene - delay: hours: 0 minutes: 0 seconds: 5 milliseconds: 0 - service: switch.turn_off target: entity_id: !input power else: - service: switch.turn_on target: entity_id: !input power - delay: hours: 0 minutes: 0 seconds: 5 milliseconds: 0 - choose: - conditions: - "{{ states('sensor.bedroom_temp_temperature') | float < cold }}" sequence: - service: scene.turn_on target: entity_id: !input heat_scene - conditions: - "{{ states('sensor.bedroom_temp_temperature') | float > hot }}" sequence: - service: scene.turn_on target: entity_id: !input cool_scene default: - service: switch.turn_off target: entity_id: !input power - service: switch.turn_on target: entity_id: !input power - choose: [] default: !input "confirm" # - if: # - condition: state # entity_id: switch.bedroom_aircon # state: 'off' # then: # - service: switch.turn_on # data: {} # target: # entity_id: switch.bedroom_aircon # - delay: # hours: 0 # minutes: 0 # seconds: 5 # milliseconds: 0 - service: scene.turn_on target: entity_id: scene.hyundai_aircon_cool_18 metadata: {} mode: single