Skip to content

HA Custom Card by @lloyda

lloyda edited this page Oct 17, 2022 · 5 revisions

NOTE: Requires ramses_cc v0.21.5

Simple example which gives a way to iterate through schedule data for display in markdown card. Don't forget you need to make a service call to ramses_cc.get_zone_schedule to populate the schedule initially or after a reboot.

image

Add the following to config.yaml to pull the schedule for a room into the attributes of a sensor, remembering to update the climate entity to suite your installation:

    - platform: template
      sensors:
        study_schedule:
          value_template: "{{ state_attr('climate.evohome_cc_01_185426_01', 'schedule')[0]['switchpoints'] }}" 
          attribute_templates:
            day0: >-
              {{ state_attr('climate.evohome_cc_01_185426_01', 'schedule')[0]['switchpoints'] }}
            day1: >-
              {{ state_attr('climate.evohome_cc_01_185426_01', 'schedule')[1]['switchpoints'] }}
            day2: >-
              {{ state_attr('climate.evohome_cc_01_185426_01', 'schedule')[2]['switchpoints'] }}
            day3: >-
              {{ state_attr('climate.evohome_cc_01_185426_01', 'schedule')[3]['switchpoints'] }}
            day4: >-
              {{ state_attr('climate.evohome_cc_01_185426_01', 'schedule')[4]['switchpoints'] }}
            day5: >-
              {{ state_attr('climate.evohome_cc_01_185426_01', 'schedule')[5]['switchpoints'] }}
            day6: >-
              {{ state_attr('climate.evohome_cc_01_185426_01', 'schedule')[6]['switchpoints'] }}

Configuration for the markdown card:

    cards:
      - type: markdown
        content: >-
          ## Study
          
          ###  Sunday
          
           | Time      | Setpoint     |
           |:---|---:|
           |{% for i in state_attr("sensor.study_schedule", "day6")  %}
           |{{i.time_of_day}}   |   {{i.heat_setpoint}}°C  |
           {%- endfor %}
           
           ---    
          
          ###  Monday
          
           | Time      | Setpoint     |
           |:---|---:|
           |{% for i in state_attr("sensor.study_schedule", "day0")  %}
           |{{i.time_of_day}}   |   {{i.heat_setpoint}}°C  |
           {%- endfor %}
           
           ---   
          ###  Tuesday
          
           | Time      | Setpoint     |
           |:---|---:|
           |{% for i in state_attr("sensor.study_schedule", "day1")  %}
           |{{i.time_of_day}}   |   {{i.heat_setpoint}}°C  |
           {%- endfor %}
           
           --- 
          ###  Wednesday
          
           | Time      | Setpoint     |
           |:---|---:|
           |{% for i in state_attr("sensor.study_schedule", "day2")  %}
           |{{i.time_of_day}}   |   {{i.heat_setpoint}}°C  |
           {%- endfor %}
           
           --- 
          ###  Thursday
          
           | Time      | Setpoint     |
           |:---|---:|
           |{% for i in state_attr("sensor.study_schedule", "day3")  %}
           |{{i.time_of_day}}   |   {{i.heat_setpoint}}°C  |
           {%- endfor %}
           
           --- 
          ###  Friday
          
           | Time      | Setpoint     |
           |:---|---:|
           |{% for i in state_attr("sensor.study_schedule", "day4")  %}
           |{{i.time_of_day}}   |   {{i.heat_setpoint}}°C  |
           {%- endfor %}
           --- 
          ###  Saturday
          
           | Time      | Setpoint     |
           |:---|---:|
           |{% for i in state_attr("sensor.study_schedule", "day5")  %}
           |{{i.time_of_day}}   |   {{i.heat_setpoint}}°C  |
           {%- endfor %}