[Lovelace UI] kafelek Airly

Właśnie dokumentacja jest okropnie zrobiona… no ale własnie tak o tym pomysłałem że dobiorę się “od tyłu” czyli debugerem więc udało mi się już to ogarnąć… w umie nie pasowało mi wartości % względem wartości value … więc w debugerze ładnie widać …

przerabiam pod siebie i podzielę się później gotowcem :slight_smile:

—===EDIT===—
wrzucam gotowiec - udało się wyciągnąć trochę więcej danych :slight_smile:

image

dashboard:

type: custom:layout-card
cards:
  - type: grid
    columns: 3
    cards:
      - type: custom:mini-graph-card
        card_mod:
          style: |
            ha-card {--ha-card-background: #0a0a0a; 
        entities:
          - sensor.airly_temperature
        name: Temperatura
        color_thresholds:
          - value: -7
            color: '#157feb'
          - value: 0
            color: '#4dd2fd'
          - value: 5
            color: '#2ae96d'
          - value: 10
            color: '#2ae96d'
          - value: 15
            color: '#e2e92a'
          - value: 20
            color: '#e9d02a'
          - value: 25
            color: '#f7b923'
          - value: 30
            color: '#f79623'
          - value: 35
            color: '#f75a23'
          - value: 40
            color: '#f75a23'
        line_width: 2
        font_size: 65
        font_size_header: 12
        hours_to_show: 120
        points_per_hour: 3
      - type: custom:mini-graph-card
        card_mod:
          style: |
            ha-card {--ha-card-background: #0a0a0a; 
        entities:
          - sensor.airly_humidity
        name: Wilgotność
        color_thresholds:
          - value: 5
            color: '#f4cb0e'
          - value: 40
            color: '#2eda00'
          - value: 65
            color: '#f4cb0e'
          - value: 90
            color: '#ff1200'
        line_width: 2
        font_size: 65
        font_size_header: 12
        hours_to_show: 120
        points_per_hour: 3
      - type: custom:mini-graph-card
        card_mod:
          style: |
            ha-card {--ha-card-background: #0a0a0a; 
        entities:
          - sensor.airly_pressure
        name: Ciśnienie
        color_thresholds:
          - value: 950
            color: '#057928'
          - value: 1010
            color: '#33d612'
          - value: 1020
            color: '#e5ce0f'
          - value: 1030
            color: '#ffa70f'
        line_width: 2
        font_size: 65
        font_size_header: 12
        hours_to_show: 120
        points_per_hour: 3
      - type: custom:mini-graph-card
        card_mod:
          style: |
            ha-card {--ha-card-background: #0a0a0a; 
        entities:
          - sensor.airly_pm1
        name: PM1
        color_thresholds:
          - value: 10
            color: '#68c920'
          - value: 30
            color: '#d35400'
          - value: 60
            color: '#ff1200'
        line_width: 2
        font_size: 60
        font_size_header: 10
        hours_to_show: 120
        points_per_hour: 3
      - type: custom:mini-graph-card
        card_mod:
          style: |
            ha-card {--ha-card-background: #0a0a0a; 
        entities:
          - entity: sensor.airly_pm2_5
            name: PM2.5
          - entity: sensor.airly_pm2_5_2
            show_graph: false
            show_state: true
        color_thresholds:
          - value: 20
            color: '#68c920'
          - value: 50
            color: '#d35400'
          - value: 70
            color: '#ff1200'
        line_width: 2
        font_size: 60
        font_size_header: 10
        hours_to_show: 120
        points_per_hour: 3
      - type: custom:mini-graph-card
        card_mod:
          style: |
            ha-card {--ha-card-background: #0a0a0a; 
        entities:
          - entity: sensor.airly_pm10
            name: PM10
          - entity: sensor.airly_pm10_2
            show_graph: false
            show_state: true
        color_thresholds:
          - value: 20
            color: '#68c920'
          - value: 50
            color: '#d35400'
          - value: 70
            color: '#ff1200'
        line_width: 2
        font_size: 60
        font_size_header: 10
        hours_to_show: 120
        points_per_hour: 3
  - type: grid
    columns: 2
    square: false
    cards:
      - type: custom:mini-graph-card
        card_mod:
          style: |
            ha-card {--ha-card-background: #0a0a0a; 
        entities:
          - entity: sensor.airly_o3
            name: Ozon O3
          - entity: sensor.airly_o3_2
            show_graph: false
            show_state: true
        color_thresholds:
          - value: 20
            color: '#68c920'
          - value: 50
            color: '#d35400'
          - value: 70
            color: '#ff1200'
        line_width: 2
        font_size: 65
        font_size_header: 12
        hours_to_show: 120
        points_per_hour: 3
      - type: custom:mini-graph-card
        card_mod:
          style: |
            ha-card {--ha-card-background: #0a0a0a; 
        entities:
          - entity: sensor.airly_no2
            name: Dwutlenek azotu No2
          - entity: sensor.airly_no2_2
            show_graph: false
            show_state: true
        color_thresholds:
          - value: 20
            color: '#68c920'
          - value: 50
            color: '#d35400'
          - value: 70
            color: '#ff1200'
        line_width: 2
        font_size: 65
        font_size_header: 12
        hours_to_show: 120
        points_per_hour: 3

sensors dla mqtt:


mqtt:
  sensor:
    - name: "Airly limit"
      state_class: measurement
      unit_of_measurement: "/100"
      state_topic: "node-red/Airly/limit/value"
      payload_available: "online"
      payload_not_available: "offline"

    - name: "Airly NO2"
      device_class: nitrogen_monoxide
      state_class: measurement
      unit_of_measurement: "µg/m³"
      state_topic: "node-red/Airly/NO2/value"
      payload_available: "online"
      payload_not_available: "offline"

    - name: "Airly NO2_2"
      device_class: nitrogen_monoxide
      state_class: measurement
      unit_of_measurement: "%"
      state_topic: "node-red/Airly/NO2/limit-percent"
      payload_available: "online"
      payload_not_available: "offline"

    - name: "Airly O3"
      device_class: ozone
      state_class: measurement
      unit_of_measurement: "µg/m³"
      state_topic: "node-red/Airly/O3/value"
      payload_available: "online"
      payload_not_available: "offline"

    - name: "Airly O3_2"
      device_class: ozone
      state_class: measurement
      unit_of_measurement: "%"
      state_topic: "node-red/Airly/O3/limit-percent"
      payload_available: "online"
      payload_not_available: "offline"

    - name: "Airly PM1"
      device_class: pm1
      state_class: measurement
      unit_of_measurement: "µg/m³"
      state_topic: "node-red/Airly/PM1/value"
      payload_available: "online"
      payload_not_available: "offline"

    - name: "Airly PM2.5"
      device_class: pm25
      state_class: measurement
      unit_of_measurement: "µg/m³"
      state_topic: "node-red/Airly/PM25/value"
      payload_available: "online"
      payload_not_available: "offline"

    - name: "Airly PM2_5_2"
      device_class: pm25
      state_class: measurement
      unit_of_measurement: "%"
      state_topic: "node-red/Airly/PM25/limit-percent"
      payload_available: "online"
      payload_not_available: "offline"

    - name: "Airly PM10"
      device_class: pm10
      state_class: measurement
      unit_of_measurement: "µg/m³"
      state_topic: "node-red/Airly/PM10/value"
      payload_available: "online"
      payload_not_available: "offline"

    - name: "Airly PM10_2"
      device_class: pm10
      state_class: measurement
      unit_of_measurement: "%"
      state_topic: "node-red/Airly/PM10/limit-percent"
      payload_available: "online"
      payload_not_available: "offline"

    - name: "Airly pressure"
      device_class: pressure
      state_class: measurement
      unit_of_measurement: "hPa"
      state_topic: "node-red/Airly/climate/pressure"
      payload_available: "online"
      payload_not_available: "offline"

    - name: "Airly humidity"
      device_class: humidity
      state_class: measurement
      unit_of_measurement: "%"
      state_topic: "node-red/Airly/climate/humidity"
      payload_available: "online"
      payload_not_available: "offline"

    - name: "Airly temperature"
      device_class: temperature
      state_class: measurement
      unit_of_measurement: "°C"
      state_topic: "node-red/Airly/climate/temperature"
      payload_available: "online"
      payload_not_available: "offline"

    - name: "Airly CAQI"
      device_class: aqi
      state_class: measurement
      icon: mdi:air-filter
      unit_of_measurement: "CAQI"
      state_topic: "node-red/Airly/CAQI/value"
      payload_available: "online"
      payload_not_available: "offline"

    - name: "Airly level"
      state_topic: "node-red/Airly/CAQI/level"
      payload_available: "online"
      payload_not_available: "offline"

    - name: "Airly color"
      state_topic: "node-red/Airly/CAQI/color"
      payload_available: "online"
      payload_not_available: "offline"

    - name: "Airly description"
      state_topic: "node-red/Airly/CAQI/description"
      payload_available: "online"
      payload_not_available: "offline"

    - name: "Airly advice"
      state_topic: "node-red/Airly/CAQI/advice"
      payload_available: "online"
      payload_not_available: "offline"

no i oczywiście flow.airly do zapomportowania w NodeRed (oczywiście jest to troszkę zmodyfikowany ten co wrzucili wyżej koledzy !

flows (2).json (18,4 KB)

Gdyby Ktoś chciał to u siebie zrobiłem wersję rozbudowaną z popupem (zawiera ilość requestów które pozostały na testy - jak opanujecie to najlepiej usunąć)

image

a po kliknięciu:

jak by ktoś chciał to dajcie znać bo nie chcę za bardzo zawalić posta :slight_smile:

1 polubienie