Control the air conditioner

Can someone please attach code to air conditioner for lovelace

Not sure how this is going to help, but here you go:

cards:
  - columns: 4
    entities:
      - entity: input_select.lounge_ac_mode
      - entity: sensor.lounge_room_temperature
      - entity: sensor.lounge_room_humidity
      - entity: sensor.lounge_room_condensation_chance
    show_name: false
    type: glance
  - entities:
      - head:
          label: Automation
          type: section
        items:
          - input_boolean.lounge_ac_am_automation
          - input_boolean.lounge_ac_pm_automation
          - input_boolean.lounge_ac_workday
          - input_datetime.lounge_ac_am_on_time
          - input_datetime.lounge_ac_am_off_time
          - input_datetime.lounge_ac_pm_on_time
          - input_datetime.lounge_ac_pm_off_time
          - input_number.lounge_ac_heat_temp_set
          - input_number.lounge_ac_cool_temp_set
          - input_number.lounge_ac_temp_set_heat
          - input_number.lounge_ac_temp_set_cool
        type: 'custom:fold-entity-row'
    show_header_toggle: false
    type: entities
title: Lounge Aircon Control
type: 'custom:vertical-stack-in-card'

6 Likes

Looks good, but I’m looking for something that gives me a choice of temperature. And a bit more molded

The bottom two sliders give you any choice of temperature and you can make it as mouldy green as you want.

5 Likes

Thanks, we’ll see if there were other answers

Yeah look, sorry. That was a bit of a mean “tongue in cheek” joke. It might help if you provide a bit more detail.

What air conditioner do you use?

What component are you using to control it?

Do you have any idea what you would like to see in the Lovelace card?

Have you seen the built in thermostat card?

There is a custom version that does dual (heat and cool) as well. Dual Thermostat Card

1 Like

What air conditioner do you use?

I control the air conditioner with Brodlink.

I learned all the commands, temperature, heat, cold, etc. And, of course, go up to Temp, or download.
Mini central air conditioning - something simply unsophisticated

There is a custom version that does dual (heat and cool) as well. Dual Thermostat Card

Looks nice

Does not work for me

I have improved on my previous version for making my dumb daikin airconditioner smart.
Basic idea is to use input_selects to choose the settings (mode/temp/fan speed) you want. Learn the broadlink IR codes for every AC setting you want available and save them as scripts with formulaic names. A template sensor uses the input_select settings to show the correct script. Turning on an input_boolean, triggers an automation. The automation action turns on the correct script, causing the correct IR Code to be sent to the AC. Make a template switch which has turn_on turning on the input_boolean, and turn off turning on the off script.

Code to get the AC working is here: https://pastebin.com/Y75VhTua
Lovelace is here: https://pastebin.com/CRF4bis3

Old version: https://pastebin.com/q5MaXyMV

4 Likes

This is pretty cool @PodPerson - thanks for sharing.

This is neat. Thanks for sharing.
Do you then digest the input booleans in automations? Care to share?
Am also curious about your condensation chance sensor… I could see some use for this!

I’m travelling and don’t have access to my config at the moment. Yes all actioned in automations.

The condensation sensor is this:

1 Like

Cheers. That’s great!
Let us know when you’re back. Safe travels…

I use this:

It looks like this:

and works with Broadlink IR bridges. If anyone wants to see the config let me know.

1 Like

I use something similiar as @zoogara - Instead of purchasing a Broadlink I’m using a Nodemcu to send the IR codes. I’ve also attached a temperature/humidity sensor which sends data back to my HA. The Nodemcu is communicating via MQTT. Works great and the whole set up is no more that $4 per AC.
( I cannot figure out how to change the temperature to F, i have my units set to metric as i need it in celsius for my 3d printer cards.)

2 Likes

Nice. I use the Daikin component. In Lovelace, the card defaults to the standard thermostat card. Unfortunately, I can’t set things like fan speed via these. May need to come up with a custom card for it…

Hi, Can you show me how to put it to work ? Mine only turns off the AC. All the other buttons won’t work.
thanks a lot.

For starters, does your air conditioner appear in this list? https://github.com/smartHomeHub/SmartIR/blob/9691aaaf622de33eaaeab7b02c452ce054d8e395/docs/CLIMATE.md#available-codes-for-climate-devices

If it doesn’t then you have a long and arduous process ahead capturing codes, but no different than most other climate control solutions in HA.

Hello, thx for your reply,
And yes, my ac appears in this list, I have a gree ac.

I am also able to learn the remote codes.
What I can’t figure out os how to create the entities/service/devices ao I can create the ac card amd add the controls to it.

Ok - I am assuming you have installed the SmartIR custom component.

First thing is to enable SmartIR and define your Broadlink IR bridge, substituting your IP, MAC and type:

smartir:

switch:
  - platform: broadlink
    host: 192.168.0.136
    mac: '34:ea:34:e3:ad:52'
    type: rm_mini
    friendly_name: "Kitchen IR"

Then add SmartIR as a climate integration:

climate:
  - platform: smartir
    name: Kitchen AC
    device_code: 1282
    controller_data: 192.168.0.136
    temperature_sensor: sensor.kitchen_temperature
    humidity_sensor: sensor.kitchen_humidity

Your device code should match the one for your A/C, and ensure it exists in /config/custom_components/smartir/codes/climate. Choose a suitable sensor for temp and humidity, if you don’t have these I believe you can leave them out.

Lastly add a suitable card to Lovelace:

  - cards:
      - type: thermostat
        entity: climate.kitchen_ac
        name: Kitchen Air Conditioner
    icon: 'mdi:air-conditioner'
    state_color: true
    title: ac_view

The instructions for the SmartIR are actually on GitHub: https://github.com/smartHomeHub/SmartIR/blob/9691aaaf622de33eaaeab7b02c452ce054d8e395/docs/CLIMATE.md

Otherwise feel free to ask questions in the SmartIR thread: SmartIR - Control your Climate, TV and Fan devices via IR/RF controllers

And don’t forget to post your config if you have an issue.

If it still doesn’t work after this then maybe your a/c is a newer model and you will have to capture your own codes.

1 Like