Yup that did it!
For anyone wanting the full config here it is
climate:
- platform: climate_template
name: Downstairs AC
unique_id: '65bfec75-873e-43f4-9190-02aab52d3591'
modes:
- "auto"
- "dry"
- "off"
- "cool"
- "fan_only"
- "heat"
fan_modes:
- "auto"
- "low"
- "medium"
- "high"
min_temp: 16
max_temp: 30
# get current temp.
current_temperature_template: "{{ states('sensor.downstairs_universal_remote_temperature') }}"
# get current humidity.
current_humidity_template: "{{ states('sensor.downstairs_universal_remote_humidity') }}"
# example action
set_temperature:
- service: pyscript.switchbot_hvac
data:
deviceId: "some_device_id"
temperature: "{{ state_attr('climate.downstairs_ac', 'temperature') | int }}"
mode: >
{% if is_state('climate.downstairs_ac', 'auto') %} 1
{% elif is_state('climate.downstairs_ac', 'dry') %} 3
{% elif is_state('climate.downstairs_ac', 'off') %} 1
{% elif is_state('climate.downstairs_ac', 'cool') %} 2
{% elif is_state('climate.downstairs_ac', 'fan_only') %} 4
{% elif is_state('climate.downstairs_ac', 'heat') %} 5
{% else %} 1
{% endif %}
fan_speed: >
{% if is_state_attr('climate.downstairs_ac', 'fan_mode', 'auto') %} 1
{% elif is_state_attr('climate.downstairs_ac', 'fan_mode', 'low') %} 2
{% elif is_state_attr('climate.downstairs_ac', 'fan_mode', 'medium') %} 3
{% elif is_state_attr('climate.downstairs_ac', 'fan_mode', 'high') %} 4
{% else %} 1
{% endif %}
state: >
{% if states('climate.downstairs_ac') != "off" %} on
{% else %} off
{% endif %}
set_hvac_mode:
- service: pyscript.switchbot_hvac
data:
deviceId: "some_device_id"
temperature: "{{ state_attr('climate.downstairs_ac', 'temperature') | int }}"
mode: >
{% if is_state('climate.downstairs_ac', 'auto') %} 1
{% elif is_state('climate.downstairs_ac', 'dry') %} 3
{% elif is_state('climate.downstairs_ac', 'off') %} 1
{% elif is_state('climate.downstairs_ac', 'cool') %} 2
{% elif is_state('climate.downstairs_ac', 'fan_only') %} 4
{% elif is_state('climate.downstairs_ac', 'heat') %} 5
{% else %} 1
{% endif %}
fan_speed: >
{% if is_state_attr('climate.downstairs_ac', 'fan_mode', 'auto') %} 1
{% elif is_state_attr('climate.downstairs_ac', 'fan_mode', 'low') %} 2
{% elif is_state_attr('climate.downstairs_ac', 'fan_mode', 'medium') %} 3
{% elif is_state_attr('climate.downstairs_ac', 'fan_mode', 'high') %} 4
{% else %} 1
{% endif %}
state: >
{% if states('climate.downstairs_ac') != "off" %} on
{% else %} off
{% endif %}
set_fan_mode:
- service: pyscript.switchbot_hvac
data:
deviceId: "some_device_id"
temperature: "{{ state_attr('climate.downstairs_ac', 'temperature') | int }}"
mode: >
{% if is_state('climate.downstairs_ac', 'auto') %} 1
{% elif is_state('climate.downstairs_ac', 'dry') %} 3
{% elif is_state('climate.downstairs_ac', 'off') %} 1
{% elif is_state('climate.downstairs_ac', 'cool') %} 2
{% elif is_state('climate.downstairs_ac', 'fan_only') %} 4
{% elif is_state('climate.downstairs_ac', 'heat') %} 5
{% else %} 1
{% endif %}
fan_speed: >
{% if is_state_attr('climate.downstairs_ac', 'fan_mode', 'auto') %} 1
{% elif is_state_attr('climate.downstairs_ac', 'fan_mode', 'low') %} 2
{% elif is_state_attr('climate.downstairs_ac', 'fan_mode', 'medium') %} 3
{% elif is_state_attr('climate.downstairs_ac', 'fan_mode', 'high') %} 4
{% else %} 1
{% endif %}
state: >
{% if states('climate.downstairs_ac') != "off" %} on
{% else %} off
{% endif %}