title: Flemmings palass
resources:
  - url: /local/my-custom-card.js
    type: js
  - url: /local/my-webfont.css
    type: css
  - url: /local/custom_ui/gauge-card.js?v=1 # https://github.com/ciotlosm/custom-lovelace/tree/master/gauge-card
    type: js
  - url: /local/custom_ui/bignumber-card.js?v=2 # 
    type: js
 # - url: /local/custom_ui/button-card.js # https://github.com/ciotlosm/custom-lovelace/tree/master/bignumber-card
 #   type: module
excluded_entities:
  - weblink.router


views:

  - title: Startside
    background: SlateGrey
    icon: mdi:home-heart
    
    cards:
      - type: horizontal-stack
        cards:
        - type: "custom:button-card"
          entity: input_boolean.someone_home
          name: Noen hjemme
          icon: mdi:home
          color: lawngreen
          color_type: icon
          action: more_info
        - type: "custom:button-card"
          entity: input_boolean.flemming_home
          name: Flemming hjemme
          icon: mdi:human-greeting
          color: lawngreen
          color_type: icon
        - type: "custom:button-card"
          entity: input_boolean.guest_home
          name: Gjest hjemme
          icon: mdi:human-greeting
          color: lawngreen
          color_type: icon



      - type: entities
        title: Robotstøvsuger
        entities:
          - vacuum.xiaomi_vacuum_cleaner



  - title: Belysning
    background: linear-gradient(lightskyblue, grey)
    icon: mdi:lightbulb

    cards:
      - type: entities
        title: Inne
        entities:
          - switch.zwave_1
          - switch.zwave_11
          - light.zwave_21
          - light.zwave_25
          - light.limitlessled_g1
          - light.limitlessled_g2
          - light.limitlessled_g3

      - type: entities
        title: Ute
        entities:
          - light.zwave_30

  - title: System
    background: linear-gradient(lightskyblue, grey)
    icon: mdi:console
    cards:
      - type: entities
        title: Z-Wave Nettverk
        entities:
          - zwave.zwaveme_zme_uzb1_usb_stick
          - zwave.zwave_1
          - zwave.zwave_11
          - zwave.zwave_12_sensor
          - zwave.zwave_15_sensor
          - zwave.zwave_16_sensor
          - zwave.zwave_21
          - zwave.zwave_22_sensor
          - zwave.zwave_25
          - zwave.zwave_26_sensor
          - zwave.zwave_28
          - zwave.zwave_30
          - zwave.zwave_32
          - zwave.zwave_33
      - type: entities
        title: Automasjoner
        entities:
          - group.all_automations
      - type: entities
        title: Brytere (RFXTRX)
        show_header_toggle: false
        entities:
          - switch.rfxtrx_17_a #17 Stue - Bryter Venstre 
          - switch.rfxtrx_17_b #17 Stue - Bryter Høyre
          - switch.rfxtrx_18_a #18 Soverom - Bryter Venstre
          - switch.rfxtrx_18_b #18 Soverom - Bryter Høyre
          - switch.rfxtrx_38_a #38 Stue/Sofa - Bryter Venstre
          - switch.rfxtrx_38_b #38 Stue/Sofa - Bryter Høyre

      - type: history-graph
        title: Ping
        entities:
          - binary_sensor.pfsense
          - binary_sensor.switch
          - binary_sensor.switchstue
          - binary_sensor.switchkontor
          - binary_sensor.ap
          - binary_sensor.skriverkontor
          - binary_sensor.milight
          - binary_sensor.harmonyhub


  - title: Fitness
    background: linear-gradient(lightskyblue, grey)
    icon: mdi:human-handsup
    cards:
      - type: entities
        title: Fitbit
        entities:
          - sensor.charge_2_battery
          - sensor.flex_2_battery
          - sensor.calories
          - sensor.weight
          - sensor.body_fat
          - sensor.steps
          - sensor.floors
          - sensor.resting_heart_rate
          - sensor.distance
          - sensor.elevation
          - sensor.sleep_efficiency
          - sensor.sleep_minutes_asleep
          - sensor.sleep_minutes_awake
          - sensor.sleep_start_time
  

  - title: Klima
    background: DarkKhaki
    icon: mdi:cloud-search
    cards:

      - type: markdown
        content: >
          # Luftfuktighet

      - type: horizontal-stack
        cards:
        - type: custom:gauge-card
          title: Stue/Kjøkken
          entity: sensor.rfxtrx_2_humidity
          min: 0
          max: 100
          scale: '30px'
          severity:
            green: 20
            yellow: 40
            red: 50
        - type: custom:gauge-card
          title: Bad
          entity: sensor.rfxtrx_3_humidity
          min: 0
          max: 100
          scale: '30px'
          severity:
            green: 20
            yellow: 40
            red: 50
        - type: custom:gauge-card
          title: Soverom
          entity: sensor.rfxtrx_8_humidity
          min: 0
          max: 100
          scale: '30px'
          severity:
            green: 20
            yellow: 40
            red: 50

      - type: horizontal-stack
        cards:
        - type: custom:gauge-card
          title: Kontor/Gjesterom
          entity: sensor.rfxtrx_9_humidity
          min: 0
          max: 100
          scale: '30px'
          severity:
            green: 20
            yellow: 40
            red: 50
        - type: custom:gauge-card
          title: Bod
          entity: sensor.rfxtrx_13_humidity
          min: 0
          max: 100
          scale: '30px'
          severity:
            green: 20
            yellow: 40
            red: 50
        - type: custom:gauge-card
          title: V.F.
          entity: sensor.rfxtrx_14_humidity
          min: 0
          max: 100
          scale: '30px'
          severity:
            green: 20
            yellow: 40
            red: 50


      - type: entities
        title: Vær i Sanntid
        entities:
          - sensor.yr_weather_cloudiness
          - sensor.yr_weather_dewpoint_temperature
          - sensor.yr_weather_fog
          - sensor.yr_weather_humidity
          - sensor.yr_weather_pressure
          - sensor.yr_weather_temperature
          - sensor.yr_weather_wind_direction
          - sensor.yr_weather_wind_speed
          
      - type: iframe
        url: https://www.yr.no/sted/Norge/Vest-Agder/Kristiansand/Mosby/meteogram_med_observasjon.png
        aspect_ratio: 66%

      - type: entities
        title: Sensorer
        entities:
          - sensor.rfxtrx_31_temperature #Fryseskap
          - sensor.rfxtrx_29_temperature #Kjøleskap




  - title: Diverse
    background: linear-gradient(lightskyblue, grey)
    icon: mdi:web
    cards:

      - type: entities
        title: Brannsikkerhet
        entities:
          - sensor.rfxtrx_5_sensor_status #Soverom
          - sensor.rfxtrx_6_sensor_status #Stue
          - sensor.rfxtrx_7_sensor_status #Kontor

      - type: entities
        title: Reisetid (Bil)
        entities:
          - sensor.google_travel_time_hjem_til_jobb
          - sensor.google_travel_time_hjem_til_fitness247
          - sensor.google_travel_time_hjem_til_sogne

      - type: custom:gauge-card
        title: Kjøleskap
        entity: sensor.rfxtrx_29_temperature
        min: -30
        max: 30
        severity:
          red: -30
          green: 0
          red: 10
      - type: custom:gauge-card
        title: Fryseskap
        entity: sensor.rfxtrx_31_temperature
        min: -30
        max: 30
        severity:
          green: -30
          yellow: -5
          red: 0

  - title: Media
    background: Orange
    icon: mdi:television-classic
    cards:


      - type: vertical-stack
        cards:

        - type: horizontal-stack
          cards:
          - type: markdown
            content: >
              # TV

        - type: horizontal-stack
          cards:

          - type: "custom:button-card"
            entity: switch.switch_tv_power
            name: "Av/På"
            icon: mdi:power
            color: lawngreen
            color_off: grey
            color_type: icon

        - type: horizontal-stack
          cards:
          - type: markdown
            content: >
              # Pre-Amp

        - type: horizontal-stack
          cards:

          - type: "custom:button-card"
            entity: script.harmonyhub_preamplifier_powertoggle
            name: "Av/På"
            icon: mdi:power
            color_off: black
            color_type: icon

        - type: horizontal-stack
          cards:
          - type: "custom:button-card"
            entity: script.harmonyhub_preamplifier_mute
            name: Mute
            icon: mdi:volume-mute
            color_off: black
            color_type: icon
          - type: "custom:button-card"
            entity: script.harmonyhub_preamplifier_volumedown
            name: "Volum ned"
            icon: mdi:volume-minus
            color_off: black
            color_type: icon
          - type: "custom:button-card"
            entity: script.harmonyhub_preamplifier_volumeup
            name: "Volum opp"
            icon: mdi:volume-plus
            color_off: black
            color_type: icon
