Karta wykres czujników + zakres czasu

Screenshot - 16.05.2021 , 21_30_22

Karta z wyborem czujnika i zakresem czasu.
Karata HA :

type: vertical-stack
cards:
  - type: entities
    entities:
      - entity: input_select.hours_to_show
        name: Wybierz godziny do wyświetlenia
  - type: entities
    entities:
      - entity: input_select.sensors_to_show
        name: Wybierz czujnik
  - type: 'custom:config-template-card'
    variables:
      - 'states[''input_select.hours_to_show''].state'
      - 'states[''input_select.sensors_to_show''].state'
    entities:
      - input_select.hours_to_show
      - input_select.sensors_to_show
    card:
      type: 'custom:mini-graph-card'
      entities:
        - entity: '${vars[1]}'
          name: '${vars[1]}'
      hours_to_show: '${vars[0]}'
      points_per_hour: 15
      line_width: 3
      show:
        points: hover
        labels: true
        average: true
        extrema: true

input_select.yaml

hours_to_show:
  name: Hours to show
  options:
    - 24
    - 12
    - 4
    - 2
    - 48
    - 72      
  initial: 24  


sensors_to_show:
  name: Sensors To Show
  options:
    - sensor.pogoda_balkon_temperature
    - sensor.czujnik_c_pokoj_temperature
    - sensor.0x00124b002214f7f7_temperature
    - sensor.czujnik_c_kuchnia_temperature

Wymagany: Config Template Card Card instalowany z HACS

https://github.com/iantrich/config-template-card

2 polubienia