Initial commit
This commit is contained in:
38
custom_templates/frankensystem.jinja
Normal file
38
custom_templates/frankensystem.jinja
Normal file
@@ -0,0 +1,38 @@
|
||||
{% macro frankensystem_fan_is_on() %}
|
||||
{% if state_attr('climate.thermostat', 'fan_mode') == 'on' or state_attr('climate.thermostat', 'hvac_action') != 'idle' %}
|
||||
{{ true }}
|
||||
{% else %}
|
||||
{{ false }}
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro get_frankensystem_fan_percent() %}
|
||||
{% set fan_speed = 0 %}
|
||||
|
||||
{% if frankensystem_fan_is_on() %}
|
||||
{% if is_state('switch.fan_high', 'on') %}
|
||||
{% set fan_speed = 100 %}
|
||||
{% elif is_state('switch.fan_medium_high', 'on') %}
|
||||
{% set fan_speed = 75 %}
|
||||
{% elif is_state('switch.fan_medium_low', 'on') %}
|
||||
{% set fan_speed = 50 %}
|
||||
{% elif is_state('switch.fan_low', 'on') %}
|
||||
{% set fan_speed = 25 %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{{ fan_speed }}
|
||||
|
||||
{% endmacro %}
|
||||
|
||||
{% macro get_active_fan_switch_id() %}
|
||||
{% if is_state('switch.fan_high', 'on') %}
|
||||
{{ "switch.fan_high" }}
|
||||
{% elif is_state('switch.fan_medium_high', 'on') %}
|
||||
{{ "switch.fan_medium_high" }}
|
||||
{% elif is_state('switch.fan_medium_low', 'on') %}
|
||||
{{ "switch.fan_medium_low" }}
|
||||
{% elif is_state('switch.fan_low', 'on') %}
|
||||
{{ "switch.fan_low" }}
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
Reference in New Issue
Block a user