Hi
I need to expand my automation and I am wondering if I could use something like the following example from generic thermostat
Ideally I would like, between 19:00 to 22:00 to turn on if the temperature is below 19 celcius
but if the temperature rises more than 22 to turn to low (fan mode). In the same time if it drops to 20 again to turn to mid (fan mode) Thatâs the idea at least. Can this be done (hopefully) in the one automation, and if yes can you please alter a bit my code?
It can, you could probably adapt something Iâm using to automatically adjust the thermostat temperature based on the room temp (my airconâs temp sensor is not very accurate due to the bad spot it is located).
- id: adjust_climate_temp
alias: 'Climate - Auto Adjust Temperature'
trigger:
- platform: time_pattern
minutes: '/10'
seconds: 00
condition:
- condition: state
entity_id: group.people_status
state: 'home'
- condition: state
entity_id: input_boolean.aircon_prevent_adjustment
state: 'off'
- condition: or
conditions:
- condition: and
conditions:
- condition: template
value_template: "{{ states.climate.airconditioner.state == 'cool' }}"
- condition: template
value_template: "{{ not ((states.sensor.living_room_temperature_f.state | float >= (states.input_number.climate_auto_cool.state | float - 1.0)) and (states.sensor.living_room_temperature_f.state | float <= (states.input_number.climate_auto_cool.state | float + 0.5))) }}"
- condition: or
conditions:
- condition: template
value_template: "{{ (states.sensor.living_room_temperature_f.state | float < (states.input_number.climate_auto_cool.state | float - 1.0)) and (states.climate.airconditioner.attributes.temperature | int <= 29) and ((states.climate.airconditioner.attributes.temperature | int - states.input_number.climate_auto_cool.state | int) <= 2) }}"
- condition: template
value_template: "{{ (states.sensor.living_room_temperature_f.state | float > (states.input_number.climate_auto_cool.state | float + 0.5)) and (states.climate.airconditioner.attributes.temperature | int >= 19) and ((states.input_number.climate_auto_cool.state | int - states.climate.airconditioner.attributes.temperature | int) <= 2) }}"
- condition: and
conditions:
- condition: template
value_template: "{{ (states.climate.airconditioner.state == 'heat') }}"
- condition: template
value_template: "{{ not ((states.sensor.living_room_temperature_f.state | float >= (states.input_number.climate_auto_heat.state | float - 0.5)) and (states.sensor.living_room_temperature_f.state | float <= (states.input_number.climate_auto_heat.state | float + 1.0))) }}"
- condition: or
conditions:
- condition: template
value_template: "{{ (states.sensor.living_room_temperature_f.state | float < (states.input_number.climate_auto_heat.state | float - 0.5)) and (states.climate.airconditioner.attributes.temperature | int <= 29) and ((states.climate.airconditioner.attributes.temperature | int - states.input_number.climate_auto_heat.state | int) <= 2) }}"
- condition: template
value_template: "{{ (states.sensor.living_room_temperature_f.state | float > (states.input_number.climate_auto_heat.state | float + 1.0)) and (states.climate.airconditioner.attributes.temperature | int >= 19) and ((states.input_number.climate_auto_heat.state | int - states.climate.airconditioner.attributes.temperature | int) <= 2) }}"
- condition: template
value_template: '{{ ((as_timestamp(now()) - as_timestamp(states.climate.airconditioner.last_changed) | default(0)) | int) > 590 }}'
action:
- service_template: >
{% if (states.climate.airconditioner.state == 'cool') and (states.sensor.living_room_temperature_f.state | float < (states.input_number.climate_auto_cool.state | float - 1.0)) and (states.climate.airconditioner.attributes.temperature | int <= 29) %}
climate.set_temperature
{% elif (states.climate.airconditioner.state == 'cool') and (states.sensor.living_room_temperature_f.state | float > (states.input_number.climate_auto_cool.state | float + 0.5)) and (states.climate.airconditioner.attributes.temperature | int >= 19) %}
climate.set_temperature
{% else %}
script.do_nothing
{% endif %}
data_template:
entity_id: climate.airconditioner
temperature: >
{% if (states.climate.airconditioner.state == 'cool') and (states.sensor.living_room_temperature_f.state | float < (states.input_number.climate_auto_cool.state | float - 1.0)) and (states.climate.airconditioner.attributes.temperature | int <= 29) %}
{{ states.climate.airconditioner.attributes.temperature | int + 1 }}
{% elif (states.climate.airconditioner.state == 'cool') and (states.sensor.living_room_temperature_f.state | float > (states.input_number.climate_auto_cool.state | float + 0.5)) and (states.climate.airconditioner.attributes.temperature | int >= 19) %}
{{ states.climate.airconditioner.attributes.temperature | int - 1 }}
{% elif (states.climate.airconditioner.state == 'heat') and (states.sensor.living_room_temperature_f.state | float < (states.input_number.climate_auto_heat.state | float - 0.5)) and (states.climate.airconditioner.attributes.temperature | int <= 29) %}
{{ states.climate.airconditioner.attributes.temperature | int + 1 }}
{% elif (states.climate.airconditioner.state == 'heat') and (states.sensor.living_room_temperature_f.state | float > (states.input_number.climate_auto_heat.state | float + 1.0)) and (states.climate.airconditioner.attributes.temperature | int >= 19) %}
{{ states.climate.airconditioner.attributes.temperature | int - 1 }}
{% else %}
{{ states.climate.airconditioner.attributes.temperature | int }}
{% endif %}
hvac_mode: >
{% if (states.climate.airconditioner.state == 'cool') %}
cool
{% elif (states.climate.airconditioner.state == 'heat') %}
heat
{% else %}
{{ states.climate.airconditioner.state }}
{% endif %}
Your conditions will need to be time, rather than mine where I am sensing if the temperature is outside of a set range. Yours would be a LOT simpler then what is posted but its just an example to work off.
Thanks. I really donât know where or how to even start. I think I have to study your code and how I could alternate to my needs (I have not used templates until now-i find them difficult)
A lot of those templates are just being used to determine whether the current indoor temperature is above or below the set temperature, in order to decide whether to raise or lower the set temperature (or do nothing). You can probably ignore most of that.
Essentially the automation is running ever 10 minutes, evaluating some stuff and then making a decision based on that.
You can do something similiar whereby, the condition just checks if the time is between the times you want it to execute. In the script body, you can then check if it should then raise or lower the fan speed (and also check if the fan is already at the speed you want it; if so dont run).
You could do a simpler script and just execute when the temperature goes above/below a certain range; but if it happens outside that time range, and so never runs, it wont re-execute when it is in that time range; it wont re-execute until the temperature drops or raises back into the valid range and then drops/raises back out of it again.
How to add swing option for the AC? Iâm going to make a new code for Daikin, Fujitsu and Mitsubishi (Thatâs all I have) with swing ON/OFF option. Iâm quite understand how code JSON work but Iâm not really into python at all, so Iâm not really sure if I need to modify climate.py or not
Does somebody use with Google home?
I configured time ago properly and I was able to command volume of TV (Samsung).
From 2 weeks, when I ask Google to change volume, it tell me that is not supported
For the climate part, how do you configure your own code set? At the moment i took a similar model to my AC/ Heater (1160) and then the code set file appeared in the customer_compents directory, after that i updated all of the codes with my own but from the looks of it this file will get overwritten on an update? Can i just create a file with a random number and then use that?
Hi guys,
Iâm trying to use SmartIR to control a TV LG (1040).
Iâve read a lot of guides and this long thread that is mostly for climate and not for media control.
I have a working mediaplayer entity in my lovelace, that turns on and off, and anything that can be done via the âthree dotsâ menu.
But i dont understand how i can send commands that are in the 1040.json files without copy the base64 code to a script.
Is there a way to send a âpreviousChannelâ instead of a âJgBgAAABK5MTEhMSEzcTEhMSExITEhMSEzcTNhQSEzYUNhQ2FDYUNhQ2ExITEhMSExITEhMSExITEhM3EzcTNhQ2FDYUNhQ2FAAFKwABK0kTAAxjAAErSRMADGIAAStJEwANBQAAAAAAAAAAâ ?
Hello could anyone help me on how to add multiple ACs ? I have already add one and it works perfect but I cant add multiple⌠my config is #smartir
smartir:
HelloâŚi was configuring my broadlink the old way with switches and came across this post. i gave it a try but having following errors while setting up a cable tv box:
Can someone please help me figure this out as i imagine its a better way to use the broadlink RM mini. Note that i created a json file code 1001 with my own IR base 64 codes. these has been tested before.
Would like to request a feature for the SmartIR platform - pseudo-lights.
Most LED strips and some LED bulbs come with an IR remote. It would be great to be able to trick HA into thinking that these devices were actually light entities where, when a change to the light was requested in HA, it sends it via IR to the device.
I believe that you could fairly easily fake the colour attribute by proximity to the fixed colours available in most LED strips.
Iâve started working on adding a new remote for AC. I recorded all the possible combinations, but at some point they seems to change. Any ideas how can I record the right IR codes? Iâm using broadlink RM to record and send the codes.
@Vassilis help will be much appreciated. I would like to contribute to your project with two remotes, but I need to understand whatâs the reason for this strange behaviour.