A/C automation

Try it without the single quotes around your API key.

Thank you works perfectly now! I kept trying different things and “restarting” but only after I shut down and turned on again that it fully worked.
Thank you for your help and patience.

No worries. Enjoy! :+1:

  - alias: Oprire AC
    trigger:
     platform: template
     value_template: "{{ states('sensor.time') == (state_attr('input_datetime.oprire_ac', 'timestamp') | int | timestamp_custom('%H:%M', False)) }}"
    action:
    - service: climate.turn_off
      entity_id: climate.gree_ac

  - alias: Pornire AC
    trigger:
     platform: template
     value_template: "{{ states('sensor.time') == (state_attr('input_datetime.pornire_ac', 'timestamp') | int | timestamp_custom('%H:%M', False)) }}"
    action:
    - service: climate.turn_on
      entity_id: climate.gree_ac
    - service: climate.set_hvac_mode  
      data:
       entity_id: climate.gree_ac
       hvac_mode: cool
    - service: climate.set_temperature
      data:
       entity_id: climate.gree_ac
       temperature: 24
    - service: climate.set_swing_mode
      data:
       entity_id: climate.gree.ac
       swing: Fixed in the middle-low possition
    - service: climate.set_fan_mode
      data:
       entity_id: climate.gree_ac
       fan_mode: medium

I see that you are using a Gree A/C unit. I am curious as to what type of HA integration you are using to control it? I have a Lennox mini-split which I believe is the same or similar to the Gree.
thanks

The plugin can be found in HACS
to connect HVAC I had to get the encryption key, the mac address and set a fixed IP, the encryption key I obtained with the help of a routed phone in which I installed an application, (you can find details on the forums)

Thanks for your reply but unfortunately my unit only supports IR and not Wi-Fi.

You can succeed by implementing this: https://github.com/1technophile/OpenMQTTGateway

Good luck

Actually, I am currently using a Broadlink Mini 3 to control it but it is a bit of a hassle as I have to program the IR codes for every possible combination of mode/fan/temp.
Thanks for your replies.

Thanks for sharing your codes. Used it and adjust to my environment and conditions. Since I don’t have central air but split system units. I added the season integration and add condition to only turn on the AC during summer.

Hello,
Thanks a lot for your example! It helped me a lot to get it started (with changes regarding the Canadian climate… Lol). I wanted to know if you knew a way to send the parameters below in one shot? (my Fujitsu unit bip for every command receive…). I see on the API documentation of the Sensibo they use acStates and some json but I don’t know how to send that request.

Hi @PierreCa… sorry, I just put up with the multiple beeps on my system. One option (if you don’t really change the temp/fan/swing setting much) would be to just use service: climate.turn_on which would turn it on with whatever setting were used last time.

Hi @AussieByrd
Would you be able to post some more info as to where to put the snippets you had in the first post?
I am very new to this and have not learned the file structure and don’t know where to put stuff.
Thanks

Hi @TomW1605, if you’re just starting out just probably don’t have a terribly complicated setup yet, so just put the sensors in your configuration.yaml file (temperature sensors, threshold sensors) and automations in your automations.yaml file.

I actually have a pretty large setup, so I use packages to separate out aspects of my config. All of my A/C config are in a climate_control.yaml file in a packages folder (the folder sits in the same folder as the configuration.yaml file. If you’re interested in using this approach, you just need to add the following to your configuration.yaml file:

  packages: !include_dir_named packages

Just bear in mind that if using packages you need to include automation: before the - alias: lines with adjusted indents) in my snippets, like this:

automation:
  - alias: downstairs_ac_on_after_645pm
    initial_state: true
    trigger:

thanks @AussieByrd
at the moment i am mostly interested in (for now) is getting the sensors working and because i had no sensors in my config file i was missing the line above - platform: template but i found that so all good.
also thanks for the stuff about automation i will almost certainly set that up soon

My easy automation setup:
automations.yaml

## Climate On Every Day If it is colder than the set value ##
- id: '1640257485912'
  alias: Clima On 08:00-23:00 - 19.7 C
  description: Clima On 08:00-23:00 - 19.7 C
  trigger:
  - type: temperature
    platform: device
    device_id: ab68b2ca8d58eb61fb0299572713f840
    entity_id: sensor.living_room_sensor_temperature ## You Sensor ##
    domain: sensor
    below: 19.7
  - platform: time
    at: 08:10
  condition:
  - condition: time
    after: 08:00
    before: '23:00'
    weekday:
    - mon
    - tue
    - wed
    - thu
    - fri
    - sat
    - sun
  action:
  - service: climate.turn_on
    entity_id: climate.1ebaf356 # You A/C #
  - service: climate.set_temperature
    data:
      temperature: 29
      hvac_mode: heat
    target:
      entity_id: climate.1ebaf356 # You A/C #
  - service: climate.set_fan_mode
    data:
      entity_id: climate.1ebaf356 # You A/C #
      fan_mode: low
  mode: single
## Climate Off Climate shuts off when the correct temperature is reached. ##

alias: Clima Off 09:00 - 19.5 C
description: Clima Off 09:00 - 19.5 C
trigger:
  - type: temperature
    platform: device
    device_id: ab68b2ca8d58eb61fb0299572713f840
    entity_id: sensor.living_room_sensor_temperature ## You Sensor ##
    domain: sensor
    above: 20.3
  - platform: time
    at: '09:00'
condition: []
action:
  - service: climate.turn_off
    target:
      entity_id: climate.1ebaf356 # You A/C #
mode: single

Hi,
Just wanted to ask here before I start digging deeper myself:-)

Usecase:

  • Air - Air heat pump (cooling/heating) placed in my hallway connected to a Sensibo Air integrated into Home assistant.
  • Temperature sensor in the kitchen to be used as thermostat “actual temp/process value”
  • Use for example Target temperature adjustment depending on second temperature sensor to calculate the offset of the kitchen “actual temperature” compared to the heat pump temp sensor.
  • Setting the heat pump Setpoint value to the calculated one using the offset above
  • Using a standard Lovelayce thermostat card controlling the thermostat BUT using the calculated values in it (for WAF - end user shouldn’t see the magic behind)

Question: The use case seems to be one that other ppl would have faced before so asking if someone has done this?
I have used HA for a very long time but never had to really go down the drain of template sensors, advanced scripting etc. How can this be done in the “right way” according to the overall HA functionality? It’s the last bullet that bothers me, ie the Lovelace end user UI:-)

Note: The Sensibo air has this slave sensor, but it can only be used to trigger actions, not being used as described in the use case above.

Hi Fredric

There are probably a few ways you could approach this - the best option may come down to how big and how consistent the offset is between your ‘sensor’ temperature and your ‘system’ (i.e. internal heat-pump sensor) temperature is.

If the offset is not large, and you just want the heat-pump to keep running until the ‘sensor’ temperature is in a comfortable range, you could just use my setup (the top few posts here), using the ‘sensor’ temperature as the input (entity_id) for the binary_sensory. This is what I actually do.

If the offset in too large for this, but is consistent (e.g. the difference in always 2 degrees), you could just set the heat-pump to target the offset comfort level (i.e. if you are comfortable at ‘sensor’ temp of 21 degrees, but the ‘system’ temp is always 2 degrees higher, just set it to 23 degrees.

If the offset is large and inconsistent, you’ll probably need to set up a new template sensor that calculates the offset in real time (e.g. ‘sensor’ temp - ‘system’ temp), and then use a data template that calculates your adjusted target temperature using both your ‘sensor’ comfort level temperature and the current offset value from your template sensor.

Good luck!

Thanks for your answer.
Well, it is not constant and might differ significantly over time. The thing I am trying to simulate is for the ac/heat pump to use an external sensor as the actual value.
The offset will vary depending on mode as well, going from positive to negative depending on heat or cold operations.

I think the template linked above (simple offset calculation) is a start but maybe I will have to write my own custom climate to be able to use a standard thermostat card for the UI

Hi again, I think I found what I was looking for (if anyone else has the same question as me).
There was an updated variant of the blueprint linked above stored here:

This Blueprint uses a separate thermostat (a dummy one in my case) as set value input, calculates the difference between a temp sensor and the requested set value, and then set another climate entity set value using the calculated offset.