philips_airpurifier_card:
  card:
    type: vertical-stack
    cards:
      - type: horizontal-stack
        cards:
          - type: custom:button-card
            template: default
            entity: fan.philips_airpurifier
          - type: custom:button-card
            template: default
            entity: sensor.purifier_speed
            tap_action:
              action: call-service
              service: input_select.select_next
              service_data:
                entity_id: input_select.purifier_speed
          - type: custom:button-card
            template: default
            entity: sensor.purifier_preset_mode
            tap_action:
              action: call-service
              service: input_select.select_next
              service_data:
                entity_id: input_select.purifier_preset_mode
          - type: custom:button-card
            template: default
            entity: sensor.purifier_function
            tap_action:
              action: call-service
              service: script.purifier_toggle_function
          - type: custom:decluttering-card
            template: purifier_target_humidity

      - type: entities
        show_header_toggle: false
        entities:
          - type: custom:fold-entity-row
            head:
              type: custom:dummy-entity-row
              entity: sensor.purifier_air_quality
              name: Sensors
              icon: mdi:air-purifier
            open: true
            entities:
              - sensor.purifier_air_quality
              - sensor.purifier_allergens
              - sensor.purifier_temperature
              - sensor.purifier_humidity
              - binary_sensor.purifier_out_of_water
          - type: custom:fold-entity-row
            head:
              type: custom:dummy-entity-row
              entity: sensor.purifier_speed
              name: Attributes
            open: true
            entities:
              - sensor.purifier_speed
              - sensor.purifier_preset_mode
              - sensor.purifier_function
              - sensor.purifier_target_humidity
              - sensor.purifier_brightness
              - sensor.purifier_timer
              - sensor.purifier_time_remaining
              - binary_sensor.purifier_child_lock
              - binary_sensor.purifier_display_light
          - type: custom:fold-entity-row
            head:
              type: custom:dummy-entity-row
              entity: sensor.purifier_pre_filter
              name: Filters
            entities:
              - sensor.purifier_pre_filter
              - sensor.purifier_hepa_filter
              - sensor.purifier_carbon_filter
              - sensor.purifier_wick_filter
