I want to learn how to make my broadlink IR able to detect my AC states. I believe you already able to do it… Need some tips and since I’m not good with python, still having difficulty understanding the broadlink calling. Thanks
Hi there.
Unfortunately, there is no way Broadlink can read your ac state.
It works only one direction: it sends IR signal to the air. And it does not knows if anyone get it.
Moreover, each AC state = unique command.
It contains all the data, like: temperature, flow direction, heat mode etc. In one line
So you can not just send command - flow up.
It will contain flow up, temp to XX, mode: heat, and so on.
What I do with my code: each time Lovelace Ui has changed climate state it launches one of saved codes. 24 total.
And when some one take an remote and changes the temp, data at HA will be incorrect, and there is no way you can do it easy
In my case the AC is connected to a smart plug which getting mA usage for example if the AC is on then the usage will be 400+ mA but when its OFF its will shown as 0-2 mA only. This way I can have a binary_sensor with an on/off state. However, implementing it to the script is still puzzle me. Am I right? Since the state is now will show HA that my AC is on or off based on that reading? I hope you can help. Thanks
I have tasmota flashed device that measures power of AC. At Tasmota I have created the rule to send mqtt command on power more or less than 25w.
ON tele-ENERGY#Power>5 DO publish tele/k1_ac_power/power On ENDON ON tele-ENERGY#Power<5 DO publish tele/k1_ac_power/power Off ENDON
You can reproduce the same logic with Home assistant automation.
As a recipient of this data I use mqtt sensor:
sensor:
# I use power stats from PZEM 004 v3 collected with Tasmota.
# Tasmota rules for logical sensor
# Rule ON tele-ENERGY#Power>5 DO publish tele/k1_ac_power/power On ENDON ON tele-ENERGY#Power<5 DO publish tele/k1_ac_power/power Off ENDON
# TelePeriod 30
- platform: mqtt
name: K1 AC Power state
state_topic: "tele/k1_ac_power/power"
# value_template: "{{ value_json['ENERGY'].Total }}"
icon: mdi:power-plug
Thanks for the reply… since I’m using binary_sensor instead of MQTT wondering how do I do it… not good with python so trying to gues… Can you give me some idea? On how to do it let per say I have a binary sensor that allow me to detect the AC status.
I did my own with more template, however yours idea works better. Thank you soo much for all the help. Its now working 100% and a nice one. Again thanks…
There is no way I can read it from AC.
HA stores the last selected value and I only can belive that IR command was delivered.
So, If you have selected 24 degrees C at HA climate, and for some reason, someone has changed it at AC - you will no know it.
One of the solutions was (but I skipped it yet) - to send a command each XX minutes to make share that AC runs in selected mode.
This works quite well.
Now I want to set up automation(s) to further take the manual effort out of it.
As I live in the tropics the AC does not have a heater, only cooling, dry and fan.
In summer there is only one option and that is cooling.
However in cooler months (we call it winter) the days are 21-28 Celsius and nights are < 20 most nights.
As our town is by the Pacific ocean the humidity can be anywhere between 70 to 100%. This is where the dry setting comes in.
I have been running this on dry manually for an hour or so.
Drying uses less energy so I read.
Below are the lovelace cards that I have working.
I have been trying to think of an automation that can switch between cool & dry depending on temperature and humidity and season but the logic has me a bit confused at the moment.
I am unsure whether to trigger on temperature or humidity or a combination of that and season??
Can anyone give me a few ideas please.
When the temperature is acceptable, but the humidity is too high.
Use the dry mode when you do not need to cool the air.
During cooler months or the rainy season.
When to use cool mode:
You can use cool mode when both the temperature and the humidity levels are high.
Use the cool mode when you want the temperature to stay at a constant, cool level.
As I live in the wet tropics of the southern hemisphere we have very wet and hot summers and drier, cooler winters.
That said I decided to have a trigger on temperature and conditional on season as to what HVAC mode to run the AC in.
The winter months (June-August) would probably the time to run dry and cool through the rest of the year as temperatures and humidity are higher.
The next 6 months should test my theory
If anyone can see a better/smarter way please let me know.
I have created two automations
1. Dry mode
-- id: '1626054729276'
alias: Office AC Dry Mode
description: 'Run the Office AC in DRY Mode when temperature is comfortable '
trigger:
- platform: numeric_state
entity_id: sensor.rm4_mini_temperature
for: 00:01:00
below: '26'
above: '15'
condition:
- condition: state
entity_id: sensor.season
state: winter
action:
- service: climate.set_hvac_mode
target:
entity_id: climate.office_ac
data:
hvac_mode: dry
mode: single
2. Cool Mode
- id: '1626054838752'
alias: 'Office AC COOL Mode '
description: 'Run the Office AC in COOL Mode when temperature is uncomfortable '
trigger:
- platform: numeric_state
entity_id: sensor.rm4_mini_temperature
for: 00:01:00
above: '26'
condition: []
action:
- service: climate.set_hvac_mode
target:
entity_id: climate.office_ac
data:
hvac_mode: cool
mode: single
Hi, don’t remember -(
I definitely used some dummy names, but the logic of state_attr is that you first refer to your sensor and then attribute. In the case above, it should be attributed actually with power consumption, W, or mA (milliamperes?)