title: The Dusty Van
kiosk_mode:
  admin_settings:
    hide_sidebar: false
    hide_header: false
    ignore_entity_settings: true
  non_admin_settings:
    hide_sidebar: true
    hide_header: true
    ignore_entity_settings: true
  user_settings:
  - users:
    - tablet
    theme: Enhanced-Biofects
swipe_nav:
  wrap: true
  animate: swipe
  skip_hidden: true
  prevent_default: true
  swipe_amount: 5
views:
- title: Pilot
  path: pilot
  icon: mdi:steering
  type: panel
  background: linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.45)), url('/local/backgrounds/garda.jpeg') center / cover
    no-repeat fixed
  cards:
  - type: vertical-stack
    cards:
    - type: custom:mushroom-chips-card
      alignment: center
      chips:
      - type: template
        entity: sensor.sonoff_snzb_02d_temperature
        icon: mdi:home-thermometer
        icon_color: red
        content: Inside {{ states('sensor.sonoff_snzb_02d_temperature') }} °C
        card_mod:
          style: "ha-card {\n  background: rgba(255, 0, 0, 0.2) !important;\n  border: 1px solid rgba(255,0,0,0.3);\n}\n"
      - type: template
        entity: sensor.outside_temp_sonoff_temperature
        icon: mdi:thermometer
        icon_color: blue
        content: Outside {{ states('sensor.outside_temp_sonoff_temperature') }} °C
        card_mod:
          style: "ha-card {\n  background: rgba(33, 150, 243, 0.2) !important;\n  border: 1px solid rgba(33, 150, 243, 0.3);\n\
            }\n"
      - type: template
        entity: sensor.victron_system_battery_time_to_go
        icon: mdi:clock-outline
        icon_color: orange
        content: "{% set seconds = states('sensor.victron_system_battery_time_to_go') | float(0) %} {% if seconds > 0 and\
          \ seconds < 864000 %}\n  {{ (seconds / 3600) | round(1) }}h Left\n{% else %}\n  Stable\n{% endif %}"
        card_mod:
          style: "ha-card {\n  background: rgba(255, 165, 0, 0.2) !important;\n  border: 1px solid rgba(255, 165, 0, 0.3);\n\
            }\n"
      - type: template
        entity: sun.sun
        icon: '{% if is_state(''sun.sun'', ''above_horizon'') %} mdi:weather-sunset-down {% else %} mdi:weather-sunset-up
          {% endif %}'
        icon_color: white
        content: "{% if is_state('sun.sun', 'above_horizon') %}\n  Sunset {{ as_timestamp(state_attr('sun.sun', 'next_setting'))\
          \ | timestamp_custom('%H:%M') }}\n{% else %}\n  Sunrise {{ as_timestamp(state_attr('sun.sun', 'next_rising')) |\
          \ timestamp_custom('%H:%M') }}\n{% endif %}"
        card_mod:
          style: "ha-card {\n  {% if is_state('sun.sun', 'above_horizon') %}\n    background: linear-gradient(135deg, #ff9966,\
            \ #ff5e62) !important;\n  {% else %}\n    background: linear-gradient(135deg, #4b6cb7, #182848) !important;\n\
            \  {% endif %}\n  border: none;\n}\n"
    - type: horizontal-stack
      cards:
      - type: vertical-stack
        cards:
        - type: custom:mushroom-template-card
          primary: "{% if is_state('light.tz3210_f0byevky_ts0503b', 'on') or is_state('climate.heater_heater', 'heat') %}\n\
            \  System Active - Tap to Kill\n{% else %}\n  All Systems Off\n{% endif %}"
          secondary: Controls Lights & Heater
          icon: mdi:power
          icon_color: "{% if is_state('light.tz3210_f0byevky_ts0503b', 'on') or is_state('climate.heater_heater', 'heat')\
            \ %}\n  red\n{% else %}\n  green\n{% endif %}"
          tap_action:
            action: call-service
            service: homeassistant.turn_off
            target:
              entity_id:
              - light.tz3210_f0byevky_ts0503b
              - climate.heater_heater
          card_mod:
            style: "ha-card {\n  background: rgba(0,0,0,0.6);\n  border: 1px solid rgba(255,255,255,0.1);\n}\n"
        - type: custom:mushroom-light-card
          entity: light.tz3210_f0byevky_ts0503b
          name: Main Lights
          icon: mdi:lightbulb
          layout: horizontal
          show_brightness_control: true
          use_light_color: true
          card_mod:
            style: "ha-card {\n  background: rgba(0,0,0,0.6);\n  border: 1px solid rgba(255,255,255,0.1);\n}\n"
        - type: grid
          columns: 3
          square: false
          cards:
          - type: tile
            entity: sensor.victron_system_battery_soc
            name: Battery
            color: green
          - type: tile
            entity: sensor.victron_system_dc_pv_power
            name: Solar
            color: amber
          - type: tile
            entity: sensor.victron_system_grid_l1
            name: Shore
            color: blue
        - type: vertical-stack
          cards:
          - type: custom:mushroom-template-card
            primary: '{{ states(''sensor.sm_t636b_geocoded_location'').split('','')[0] }}'
            secondary: '{{ states(''weather.forecast_home'') | title }} - {{ state_attr(''weather.forecast_home'', ''temperature'')
              }}°C'
            icon: mdi:map-marker
            icon_color: blue
            card_mod:
              style: "ha-card {\n  background: rgba(0,0,0,0.5);\n  border: 1px solid rgba(255,255,255,0.1);\n  border-radius:\
                \ 12px 12px 0px 0px;\n}\n"
          - type: weather-forecast
            entity: weather.forecast_home
            show_current: false
            show_forecast: true
            forecast_type: daily
            card_mod:
              style: "ha-card {\n  background: rgba(0,0,0,0.5);\n  border: 1px solid rgba(255,255,255,0.1);\n  border-top:\
                \ none;\n  border-radius: 0px 0px 12px 12px;\n}\n"
      - type: vertical-stack
        cards:
        - type: custom:stack-in-card
          mode: vertical
          cards:
          - type: conditional
            conditions:
            - entity: select.victron_vebus_mode_227
              state: 'ON'
            card:
              type: custom:mushroom-template-card
              primary: 230V Sockets LIVE
              secondary: Tap for Safe Mode
              icon: mdi:flash
              icon_color: green
              layout: horizontal
              tap_action:
                action: call-service
                service: select.select_option
                target:
                  entity_id: select.victron_vebus_mode_227
                data:
                  option: CHARGER
          - type: conditional
            conditions:
            - entity: select.victron_vebus_mode_227
              state_not: 'ON'
            card:
              type: custom:mushroom-template-card
              primary: Charger Only
              secondary: Tap to Power Up
              icon: mdi:battery-charging
              icon_color: blue
              layout: horizontal
              tap_action:
                action: call-service
                service: select.select_option
                target:
                  entity_id: select.victron_vebus_mode_227
                data:
                  option: 'ON'
          - type: custom:mushroom-entity-card
            entity: sensor.victron_system_consumption_l1
            name: Total AC Load
            icon: mdi:lightning-bolt
            icon_color: yellow
            layout: horizontal
        - type: grid
          columns: 2
          square: false
          cards:
          - type: custom:mushroom-template-card
            entity: sensor.zigbee_fridge_inside_temperature
            primary: 'Fridge: {{ states(entity) }} °C'
            secondary: Seen {{ relative_time(states.sensor.zigbee_fridge_inside_temperature.last_updated) }} ago
            icon: mdi:fridge
            icon_color: cyan
            layout: horizontal
          - type: custom:mushroom-template-card
            entity: climate.heater_heater
            primary: Heater
            secondary: '{{ states(entity)|title }}'
            icon: mdi:radiator
            icon_color: '{% if is_state(entity, ''heat'') %} orange {% else %} blue-grey {% endif %}'
            layout: horizontal
            tap_action:
              action: toggle
        - type: custom:stack-in-card
          cards:
          - type: custom:mushroom-template-card
            primary: Lithium Bank
            secondary: "{% set seconds = states('sensor.victron_system_battery_time_to_go') | float(-1) %} {% if seconds >\
              \ 0 and seconds < 604800 %}\n  {{ (seconds / 3600) | round(1) }}h remaining\n{% else %}\n  System Stable\n{%\
              \ endif %}"
            icon: mdi:battery-high
            icon_color: green
            layout: horizontal
          - type: gauge
            entity: sensor.victron_system_battery_soc
            needle: true
            segments:
            - from: 0
              color: '#db4437'
            - from: 25
              color: '#ffa600'
            - from: 50
              color: '#43a047'
            card_mod:
              style: 'ha-card { height: 160px !important; border: none; }

                '
          card_mod:
            style: 'ha-card { background: rgba(0,0,0,0.6); border-radius: 15px; }

              '
- title: Energy
  path: energy
  icon: mdi:flash
  type: panel
  background: linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.45)), url('/local/backgrounds/garda.jpeg') center / cover
    no-repeat fixed
  cards:
  - type: vertical-stack
    cards:
    - type: custom:mushroom-template-card
      primary: Energy Flow
      secondary: Swipe here to change tabs
      icon: mdi:gesture-swipe
      icon_color: white
      layout: horizontal
      card_mod:
        style: 'ha-card { background: rgba(0,0,0,0.8); height: 60px; border: none; }

          '
    - type: custom:power-flow-card-plus
      entities:
        battery:
          entity: sensor.victron_system_battery_power
          state_of_charge: sensor.victron_system_battery_soc
          invert_state: true
        grid:
          entity: sensor.victron_system_grid_l1
        solar:
          entity: sensor.victron_system_dc_pv_power
        home:
          entity: sensor.victron_system_consumption_l1
      card_mod:
        style: "ha-card {\n  background: rgba(0,0,0,0.4) !important;\n  border: none;\n  height: calc(100vh - 60px) !important;\n\
          \  display: flex !important;\n  align-items: center !important;\n  justify-content: center !important;\n}\n.card-content\
          \ {\n  width: 95% !important;\n  margin: 0 auto !important;\n}\n"
- title: Navigation
  path: navigation
  icon: mdi:map-legend
  type: panel
  cards:
  - type: vertical-stack
    cards:
    - type: custom:mushroom-template-card
      primary: Navigation
      secondary: Swipe here to change tabs
      icon: mdi:gesture-swipe
      icon_color: white
      layout: horizontal
      card_mod:
        style: 'ha-card { background: rgba(0,0,0,0.8); height: 60px; border: none; }

          '
    - type: custom:map-card
      tile_layer_url: https://api.mapbox.com/styles/v1/mapbox/satellite-streets-v12/tiles/256/{z}/{x}/{y}?access_token=pk.eyJ1IjoiZGF2ZXRhc3RlIiwiYSI6ImNtazRrZWdvZDAxMTQzZnM5d3lvcGpiMHgifQ.EJM_Shr9DYBGk9tWSO3w4w
      entities:
      - entity: device_tracker.sm_t636b
      card_mod:
        style: "ha-card { \n  height: calc(100vh - 60px) !important; \n  filter: brightness(0.8) contrast(1.1) !important;\n\
          }\n"
- title: Weather
  path: weather
  icon: mdi:weather-partly-cloudy
  type: panel
  cards:
  - type: vertical-stack
    cards:
    - type: custom:mushroom-template-card
      primary: Weather Map
      secondary: Swipe here to change tabs
      icon: mdi:gesture-swipe
      icon_color: white
      layout: horizontal
      card_mod:
        style: 'ha-card { background: rgba(0,0,0,0.8); height: 60px; border: none; }

          '
    - type: iframe
      url: https://embed.windy.com/embed2.html?lat=52.583&lon=-1.100&zoom=8&overlay=rain
      card_mod:
        style: 'ha-card { height: calc(100vh - 60px) !important; border: none; }

          '
- type: panel
  path: ''
  cards:
  - type: media-control
    entity: media_player.spotify_defaultdan
  title: Spotify
