title: Vedligehold
path: vedligehold
icon: mdi:wrench-cog
type: sections

sections:
  - type: grid
    cards:
      - type: heading
        heading: Vedligehold

      - type: tile
        entity: input_boolean.vis_alle_vedligehold
        name: Vis alle

  - type: grid
    cards:
      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "on"
        card:
          type: heading
          heading: Tesla

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "off"
          - condition: state
            entity: binary_sensor.vedligehold_tesla
            state: "on"
        card:
          type: heading
          heading: Tesla

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "on"
        card:
          type: tile
          entity: sensor.snowywhite_battery
          name: Batteri

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "off"
          - condition: numeric_state
            entity: sensor.snowywhite_battery
            below: 20
        card:
          type: tile
          entity: sensor.snowywhite_battery
          name: Batteri

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "on"
        card:
          type: tile
          entity: update.snowywhite_software_update
          name: Software update

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "off"
          - condition: state
            entity: update.snowywhite_software_update
            state: "on"
        card:
          type: tile
          entity: update.snowywhite_software_update
          name: Software update

  - type: grid
    cards:
      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "on"
        card:
          type: heading
          heading: Home Assistant

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "off"
          - condition: state
            entity: binary_sensor.vedligehold_home_assistant
            state: "on"
        card:
          type: heading
          heading: Home Assistant

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "on"
        card:
          type: tile
          entity: binary_sensor.home_assistant_website_update_available
          name: Ny Home Assistant-version

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "off"
          - condition: state
            entity: binary_sensor.home_assistant_website_update_available
            state: "on"
        card:
          type: tile
          entity: binary_sensor.home_assistant_website_update_available
          name: Ny Home Assistant-version

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "on"
        card:
          type: tile
          entity: update.hacs_update
          name: HACS update

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "off"
          - condition: state
            entity: update.hacs_update
            state: "on"
        card:
          type: tile
          entity: update.hacs_update
          name: HACS update

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "on"
        card:
          type: tile
          entity: sensor.hacs_opdateringer
          name: HACS opdateringer

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "off"
          - condition: numeric_state
            entity: sensor.hacs_opdateringer
            above: 0
        card:
          type: tile
          entity: sensor.hacs_opdateringer
          name: HACS opdateringer

  - type: grid
    cards:
      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "on"
        card:
          type: heading
          heading: Synology DSM

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "off"
          - condition: state
            entity: binary_sensor.vedligehold_synology_dsm
            state: "on"
        card:
          type: heading
          heading: Synology DSM

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "on"
        card:
          type: tile
          entity: binary_sensor.dethlefsen_security_status
          name: Security status

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "off"
          - condition: state
            entity: binary_sensor.dethlefsen_security_status
            state: "on"
        card:
          type: tile
          entity: binary_sensor.dethlefsen_security_status
          name: Security status

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "on"
        card:
          type: tile
          entity: update.dethlefsen_dsm_update
          name: DSM update

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "off"
          - condition: state
            entity: update.dethlefsen_dsm_update
            state: "on"
        card:
          type: tile
          entity: update.dethlefsen_dsm_update
          name: DSM update

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "on"
        card:
          type: tile
          entity: sensor.dethlefsen_drive_1_status
          name: Disk 1 status

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "off"
          - condition: state
            entity: binary_sensor.vedligehold_synology_disk_1_status
            state: "on"
        card:
          type: tile
          entity: sensor.dethlefsen_drive_1_status
          name: Disk 1 status

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "on"
        card:
          type: tile
          entity: binary_sensor.dethlefsen_drive_1_exceeded_max_bad_sectors
          name: Disk 1 bad sectors

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "off"
          - condition: state
            entity: binary_sensor.dethlefsen_drive_1_exceeded_max_bad_sectors
            state: "on"
        card:
          type: tile
          entity: binary_sensor.dethlefsen_drive_1_exceeded_max_bad_sectors
          name: Disk 1 bad sectors

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "on"
        card:
          type: tile
          entity: binary_sensor.dethlefsen_drive_1_below_min_remaining_life
          name: Disk 1 levetid

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "off"
          - condition: state
            entity: binary_sensor.dethlefsen_drive_1_below_min_remaining_life
            state: "on"
        card:
          type: tile
          entity: binary_sensor.dethlefsen_drive_1_below_min_remaining_life
          name: Disk 1 levetid

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "on"
        card:
          type: tile
          entity: sensor.dethlefsen_drive_2_status
          name: Disk 2 status

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "off"
          - condition: state
            entity: binary_sensor.vedligehold_synology_disk_2_status
            state: "on"
        card:
          type: tile
          entity: sensor.dethlefsen_drive_2_status
          name: Disk 2 status

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "on"
        card:
          type: tile
          entity: binary_sensor.dethlefsen_drive_2_exceeded_max_bad_sectors
          name: Disk 2 bad sectors

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "off"
          - condition: state
            entity: binary_sensor.dethlefsen_drive_2_exceeded_max_bad_sectors
            state: "on"
        card:
          type: tile
          entity: binary_sensor.dethlefsen_drive_2_exceeded_max_bad_sectors
          name: Disk 2 bad sectors

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "on"
        card:
          type: tile
          entity: binary_sensor.dethlefsen_drive_2_below_min_remaining_life
          name: Disk 2 levetid

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "off"
          - condition: state
            entity: binary_sensor.dethlefsen_drive_2_below_min_remaining_life
            state: "on"
        card:
          type: tile
          entity: binary_sensor.dethlefsen_drive_2_below_min_remaining_life
          name: Disk 2 levetid

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "on"
        card:
          type: tile
          entity: sensor.dethlefsen_drive_3_status
          name: Disk 3 status

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "off"
          - condition: state
            entity: binary_sensor.vedligehold_synology_disk_3_status
            state: "on"
        card:
          type: tile
          entity: sensor.dethlefsen_drive_3_status
          name: Disk 3 status

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "on"
        card:
          type: tile
          entity: binary_sensor.dethlefsen_drive_3_exceeded_max_bad_sectors
          name: Disk 3 bad sectors

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "off"
          - condition: state
            entity: binary_sensor.dethlefsen_drive_3_exceeded_max_bad_sectors
            state: "on"
        card:
          type: tile
          entity: binary_sensor.dethlefsen_drive_3_exceeded_max_bad_sectors
          name: Disk 3 bad sectors

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "on"
        card:
          type: tile
          entity: binary_sensor.dethlefsen_drive_3_below_min_remaining_life
          name: Disk 3 levetid

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "off"
          - condition: state
            entity: binary_sensor.dethlefsen_drive_3_below_min_remaining_life
            state: "on"
        card:
          type: tile
          entity: binary_sensor.dethlefsen_drive_3_below_min_remaining_life
          name: Disk 3 levetid

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "on"
        card:
          type: tile
          entity: sensor.dethlefsen_drive_4_status
          name: Disk 4 status

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "off"
          - condition: state
            entity: binary_sensor.vedligehold_synology_disk_4_status
            state: "on"
        card:
          type: tile
          entity: sensor.dethlefsen_drive_4_status
          name: Disk 4 status

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "on"
        card:
          type: tile
          entity: binary_sensor.dethlefsen_drive_4_exceeded_max_bad_sectors
          name: Disk 4 bad sectors

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "off"
          - condition: state
            entity: binary_sensor.dethlefsen_drive_4_exceeded_max_bad_sectors
            state: "on"
        card:
          type: tile
          entity: binary_sensor.dethlefsen_drive_4_exceeded_max_bad_sectors
          name: Disk 4 bad sectors

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "on"
        card:
          type: tile
          entity: binary_sensor.dethlefsen_drive_4_below_min_remaining_life
          name: Disk 4 levetid

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "off"
          - condition: state
            entity: binary_sensor.dethlefsen_drive_4_below_min_remaining_life
            state: "on"
        card:
          type: tile
          entity: binary_sensor.dethlefsen_drive_4_below_min_remaining_life
          name: Disk 4 levetid

  - type: grid
    cards:
      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "on"
        card:
          type: heading
          heading: Affald

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "off"
          - condition: state
            entity: binary_sensor.vedligehold_affald
            state: "on"
        card:
          type: heading
          heading: Affald

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "on"
        card:
          type: tile
          entity: sensor.affalddk_norgardsvej_22_restaffald
          name: Restaffald

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "off"
          - condition: numeric_state
            entity: sensor.affalddk_norgardsvej_22_restaffald
            below: 2
        card:
          type: tile
          entity: sensor.affalddk_norgardsvej_22_restaffald
          name: Restaffald

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "on"
        card:
          type: tile
          entity: sensor.affalddk_norgardsvej_22_papir_plast
          name: Papir og plast

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "off"
          - condition: numeric_state
            entity: sensor.affalddk_norgardsvej_22_papir_plast
            below: 2
        card:
          type: tile
          entity: sensor.affalddk_norgardsvej_22_papir_plast
          name: Papir og plast

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "on"
        card:
          type: tile
          entity: sensor.affalddk_norgardsvej_22_haveaffald
          name: Haveaffald

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "off"
          - condition: numeric_state
            entity: sensor.affalddk_norgardsvej_22_haveaffald
            below: 2
        card:
          type: tile
          entity: sensor.affalddk_norgardsvej_22_haveaffald
          name: Haveaffald

  - type: grid
    cards:
      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "on"
        card:
          type: heading
          heading: Bil

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "off"
          - condition: state
            entity: binary_sensor.vedligehold_bil
            state: "on"
        card:
          type: heading
          heading: Bil

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "on"
        card:
          type: tile
          entity: sensor.snowywhite_tpms_front_left
          name: TPMS for venstre

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "off"
          - condition: numeric_state
            entity: sensor.snowywhite_tpms_front_left
            below: 39
        card:
          type: tile
          entity: sensor.snowywhite_tpms_front_left
          name: TPMS for venstre

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "on"
        card:
          type: tile
          entity: sensor.snowywhite_tpms_front_right
          name: TPMS for hojre

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "off"
          - condition: numeric_state
            entity: sensor.snowywhite_tpms_front_right
            below: 39
        card:
          type: tile
          entity: sensor.snowywhite_tpms_front_right
          name: TPMS for hojre

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "on"
        card:
          type: tile
          entity: sensor.snowywhite_tpms_rear_left
          name: TPMS bag venstre

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "off"
          - condition: numeric_state
            entity: sensor.snowywhite_tpms_rear_left
            below: 39
        card:
          type: tile
          entity: sensor.snowywhite_tpms_rear_left
          name: TPMS bag venstre

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "on"
        card:
          type: tile
          entity: sensor.snowywhite_tpms_rear_right
          name: TPMS bag hojre

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "off"
          - condition: numeric_state
            entity: sensor.snowywhite_tpms_rear_right
            below: 39
        card:
          type: tile
          entity: sensor.snowywhite_tpms_rear_right
          name: TPMS bag hojre

  - type: grid
    cards:
      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "on"
        card:
          type: heading
          heading: Stovsuger

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "off"
          - condition: state
            entity: binary_sensor.vedligehold_stovsuger
            state: "on"
        card:
          type: heading
          heading: Stovsuger

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "on"
        card:
          type: tile
          entity: binary_sensor.roborock_s8_pro_ultra_dock_clean_water_box
          name: Fyld rent vand

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "off"
          - condition: state
            entity: binary_sensor.roborock_s8_pro_ultra_dock_clean_water_box
            state: "on"
        card:
          type: tile
          entity: binary_sensor.roborock_s8_pro_ultra_dock_clean_water_box
          name: Fyld rent vand

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "on"
        card:
          type: tile
          entity: binary_sensor.roborock_s8_pro_ultra_dock_dirty_water_box
          name: Tom snavset vand

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "off"
          - condition: state
            entity: binary_sensor.roborock_s8_pro_ultra_dock_dirty_water_box
            state: "on"
        card:
          type: tile
          entity: binary_sensor.roborock_s8_pro_ultra_dock_dirty_water_box
          name: Tom snavset vand

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "on"
        card:
          type: tile
          entity: sensor.roborock_s8_pro_ultra_filter_restlevetid
          name: Filter restlevetid

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "off"
          - condition: numeric_state
            entity: sensor.roborock_s8_pro_ultra_filter_restlevetid
            below: 20
        card:
          type: tile
          entity: sensor.roborock_s8_pro_ultra_filter_restlevetid
          name: Filter restlevetid

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "on"
        card:
          type: tile
          entity: sensor.roborock_s8_pro_ultra_dock_maintenance_brush_time_left
          name: Borste restlevetid

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "off"
          - condition: numeric_state
            entity: sensor.roborock_s8_pro_ultra_dock_maintenance_brush_time_left
            below: 20
        card:
          type: tile
          entity: sensor.roborock_s8_pro_ultra_dock_maintenance_brush_time_left
          name: Borste restlevetid

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "on"
        card:
          type: tile
          entity: sensor.roborock_s8_pro_ultra_vacuum_error
          name: Fejl

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "off"
          - condition: state
            entity: binary_sensor.vedligehold_stovsuger_fejl
            state: "on"
        card:
          type: tile
          entity: sensor.roborock_s8_pro_ultra_vacuum_error
          name: Fejl

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "on"
        card:
          type: tile
          entity: sensor.roborock_s8_pro_ultra_dock_error
          name: Dock fejl

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "off"
          - condition: state
            entity: binary_sensor.vedligehold_dock_fejl
            state: "on"
        card:
          type: tile
          entity: sensor.roborock_s8_pro_ultra_dock_error
          name: Dock fejl

  - type: grid
    cards:
      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "on"
        card:
          type: heading
          heading: Opvasker

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "off"
          - condition: state
            entity: binary_sensor.vedligehold_opvasker
            state: "on"
        card:
          type: heading
          heading: Opvasker

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "on"
        card:
          type: tile
          entity: binary_sensor.dishwasher_info_2
          name: Notifikation aktiv

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "off"
          - condition: state
            entity: binary_sensor.dishwasher_info_2
            state: "on"
        card:
          type: tile
          entity: binary_sensor.dishwasher_info_2
          name: Notifikation aktiv

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "on"
        card:
          type: tile
          entity: binary_sensor.dishwasher_svigt
          name: Fejl

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "off"
          - condition: state
            entity: binary_sensor.dishwasher_svigt
            state: "on"
        card:
          type: tile
          entity: binary_sensor.dishwasher_svigt
          name: Fejl

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "on"
        card:
          type: tile
          entity: sensor.dishwasher_status_2
          name: Status

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "off"
          - condition: state
            entity: sensor.dishwasher_status_2
            state: service
        card:
          type: tile
          entity: sensor.dishwasher_status_2
          name: Status

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "on"
        card:
          type: tile
          entity: sensor.dishwasher_powerdisk_level
          name: PowerDisk

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "off"
          - condition: numeric_state
            entity: sensor.dishwasher_powerdisk_level
            below: 20
        card:
          type: tile
          entity: sensor.dishwasher_powerdisk_level
          name: PowerDisk

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "on"
        card:
          type: tile
          entity: sensor.dishwasher_salt_level
          name: Salt

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "off"
          - condition: numeric_state
            entity: sensor.dishwasher_salt_level
            below: 20
        card:
          type: tile
          entity: sensor.dishwasher_salt_level
          name: Salt

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "on"
        card:
          type: tile
          entity: sensor.dishwasher_rinse_aid_level
          name: Afspaending

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "off"
          - condition: numeric_state
            entity: sensor.dishwasher_rinse_aid_level
            below: 20
        card:
          type: tile
          entity: sensor.dishwasher_rinse_aid_level
          name: Afspaending

  - type: grid
    cards:
      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "on"
        card:
          type: heading
          heading: Plæneklipper

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "off"
          - condition: state
            entity: lawn_mower.husqvarna_automower
            state: error
        card:
          type: heading
          heading: Plæneklipper

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "on"
        card:
          type: tile
          entity: lawn_mower.husqvarna_automower
          name: Automower
          show_state: true

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "off"
          - condition: state
            entity: lawn_mower.husqvarna_automower
            state: error
        card:
          type: tile
          entity: lawn_mower.husqvarna_automower
          name: Automower
          show_state: true

  - type: grid
    cards:
      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "on"
        card:
          type: heading
          heading: Batterier

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "off"
          - condition: state
            entity: binary_sensor.vedligehold_batterier
            state: "on"
        card:
          type: heading
          heading: Batterier

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "on"
        card:
          type: tile
          entity: sensor.andreas_switch_battery
          name: Andreas switch

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "off"
          - condition: numeric_state
            entity: sensor.andreas_switch_battery
            below: 20
        card:
          type: tile
          entity: sensor.andreas_switch_battery
          name: Andreas switch

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "on"
        card:
          type: tile
          entity: sensor.daniel_switch_battery
          name: Daniel switch

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "off"
          - condition: numeric_state
            entity: sensor.daniel_switch_battery
            below: 20
        card:
          type: tile
          entity: sensor.daniel_switch_battery
          name: Daniel switch

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "on"
        card:
          type: tile
          entity: sensor.stue_switch_battery
          name: Stue switch

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "off"
          - condition: numeric_state
            entity: sensor.stue_switch_battery
            below: 20
        card:
          type: tile
          entity: sensor.stue_switch_battery
          name: Stue switch

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "on"
        card:
          type: tile
          entity: sensor.indkorsel_sensor_battery
          name: Indkorsel sensor

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "off"
          - condition: numeric_state
            entity: sensor.indkorsel_sensor_battery
            below: 20
        card:
          type: tile
          entity: sensor.indkorsel_sensor_battery
          name: Indkorsel sensor

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "on"
        card:
          type: tile
          entity: sensor.stue_motion_batteri
          name: Stue motion

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "off"
          - condition: numeric_state
            entity: sensor.stue_motion_batteri
            below: 20
        card:
          type: tile
          entity: sensor.stue_motion_batteri
          name: Stue motion

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "on"
        card:
          type: tile
          entity: sensor.hue_motion_sensor_1_battery
          name: Sovevaerelse motion 1

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "off"
          - condition: numeric_state
            entity: sensor.hue_motion_sensor_1_battery
            below: 20
        card:
          type: tile
          entity: sensor.hue_motion_sensor_1_battery
          name: Sovevaerelse motion 1

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "on"
        card:
          type: tile
          entity: sensor.hue_motion_sensor_1_battery_2
          name: Sovevaerelse motion 2

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "off"
          - condition: numeric_state
            entity: sensor.hue_motion_sensor_1_battery_2
            below: 20
        card:
          type: tile
          entity: sensor.hue_motion_sensor_1_battery_2
          name: Sovevaerelse motion 2

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "on"
        card:
          type: tile
          entity: sensor.hue_motion_sensor_2_battery
          name: Daniel motion 1

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "off"
          - condition: numeric_state
            entity: sensor.hue_motion_sensor_2_battery
            below: 20
        card:
          type: tile
          entity: sensor.hue_motion_sensor_2_battery
          name: Daniel motion 1

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "on"
        card:
          type: tile
          entity: sensor.hue_motion_sensor_2_battery_2
          name: Daniel motion 2

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "off"
          - condition: numeric_state
            entity: sensor.hue_motion_sensor_2_battery_2
            below: 20
        card:
          type: tile
          entity: sensor.hue_motion_sensor_2_battery_2
          name: Daniel motion 2

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "on"
        card:
          type: tile
          entity: sensor.bad_motion_sensor_battery
          name: Bad motion

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "off"
          - condition: numeric_state
            entity: sensor.bad_motion_sensor_battery
            below: 20
        card:
          type: tile
          entity: sensor.bad_motion_sensor_battery
          name: Bad motion

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "on"
        card:
          type: tile
          entity: sensor.gang_sensor_battery
          name: Gang sensor

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "off"
          - condition: numeric_state
            entity: sensor.gang_sensor_battery
            below: 20
        card:
          type: tile
          entity: sensor.gang_sensor_battery
          name: Gang sensor

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "on"
        card:
          type: tile
          entity: sensor.forgang_sensor_battery
          name: Forgang sensor

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "off"
          - condition: numeric_state
            entity: sensor.forgang_sensor_battery
            below: 20
        card:
          type: tile
          entity: sensor.forgang_sensor_battery
          name: Forgang sensor

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "on"
        card:
          type: tile
          entity: sensor.kontor_motion_batteri
          name: Kontor motion

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "off"
          - condition: numeric_state
            entity: sensor.kontor_motion_batteri
            below: 20
        card:
          type: tile
          entity: sensor.kontor_motion_batteri
          name: Kontor motion

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "on"
        card:
          type: tile
          entity: sensor.garage_sensor_battery
          name: Garage sensor

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "off"
          - condition: numeric_state
            entity: sensor.garage_sensor_battery
            below: 20
        card:
          type: tile
          entity: sensor.garage_sensor_battery
          name: Garage sensor

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "on"
        card:
          type: tile
          entity: sensor.anne_battery
          name: Anne garageport

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "off"
          - condition: numeric_state
            entity: sensor.anne_battery
            below: 20
        card:
          type: tile
          entity: sensor.anne_battery
          name: Anne garageport

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "on"
        card:
          type: tile
          entity: sensor.midt_battery
          name: Gardin midt

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "off"
          - condition: numeric_state
            entity: sensor.midt_battery
            below: 20
        card:
          type: tile
          entity: sensor.midt_battery
          name: Gardin midt

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "on"
        card:
          type: tile
          entity: sensor.terrasse_dor_battery
          name: Gardin terrasse-dor

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "off"
          - condition: numeric_state
            entity: sensor.terrasse_dor_battery
            below: 20
        card:
          type: tile
          entity: sensor.terrasse_dor_battery
          name: Gardin terrasse-dor

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "on"
        card:
          type: tile
          entity: sensor.venstre_battery
          name: Gardin venstre

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "off"
          - condition: numeric_state
            entity: sensor.venstre_battery
            below: 20
        card:
          type: tile
          entity: sensor.venstre_battery
          name: Gardin venstre

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "on"
        card:
          type: tile
          entity: sensor.syd_batteri
          name: Gardin syd

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "off"
          - condition: numeric_state
            entity: sensor.syd_batteri
            below: 20
        card:
          type: tile
          entity: sensor.syd_batteri
          name: Gardin syd

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "on"
        card:
          type: tile
          entity: sensor.hojre_battery
          name: Gardin hojre

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "off"
          - condition: numeric_state
            entity: sensor.hojre_battery
            below: 20
        card:
          type: tile
          entity: sensor.hojre_battery
          name: Gardin hojre

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "on"
        card:
          type: tile
          entity: sensor.garageport_batteri
          name: Garageport sensor

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "off"
          - condition: numeric_state
            entity: sensor.garageport_batteri
            below: 20
        card:
          type: tile
          entity: sensor.garageport_batteri

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "on"
        card:
          type: tile
          entity: sensor.sovevaerelse_vindue_batteri
          name: Soveværelse vindue

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "off"
          - condition: numeric_state
            entity: sensor.sovevaerelse_vindue_batteri
            below: 20
        card:
          type: tile
          entity: sensor.sovevaerelse_vindue_batteri
          name: Soveværelse vindue

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "on"
        card:
          type: tile
          entity: sensor.daniel_vindue_batteri
          name: Daniel vindue

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "off"
          - condition: numeric_state
            entity: sensor.daniel_vindue_batteri
            below: 20
        card:
          type: tile
          entity: sensor.daniel_vindue_batteri
          name: Daniel vindue

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "on"
        card:
          type: tile
          entity: sensor.andreas_vindue_batteri
          name: Andreas vindue

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "off"
          - condition: numeric_state
            entity: sensor.andreas_vindue_batteri
            below: 20
        card:
          type: tile
          entity: sensor.andreas_vindue_batteri
          name: Andreas vindue

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "on"
        card:
          type: tile
          entity: sensor.badevaerelse_vindue_batteri
          name: Badeværelse vindue

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "off"
          - condition: numeric_state
            entity: sensor.badevaerelse_vindue_batteri
            below: 20
        card:
          type: tile
          entity: sensor.badevaerelse_vindue_batteri
          name: Badeværelse vindue

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "on"
        card:
          type: tile
          entity: sensor.lille_bad_vindue_batteri
          name: Lille bad vindue

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "off"
          - condition: numeric_state
            entity: sensor.lille_bad_vindue_batteri
            below: 20
        card:
          type: tile
          entity: sensor.lille_bad_vindue_batteri
          name: Lille bad vindue

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "on"
        card:
          type: tile
          entity: sensor.terrassedor_batteri
          name: Terrassedør

      - type: conditional
        conditions:
          - condition: state
            entity: input_boolean.vis_alle_vedligehold
            state: "off"
          - condition: numeric_state
            entity: sensor.terrassedor_batteri
            below: 20
        card:
          type: tile
          entity: sensor.terrassedor_batteri
          name: Terrassedør