This guide will walk you through setting up the DVS Portal Dashboard in Home Assistant. The dashboard provides an overview of your parking reservations, balance, and other related information.
- Make sure you have installed the DVS Portal integration.
- Make sure you have HACS installed.
- Navigate to HACS > Frontend in your Home Assistant dashboard.
- Search for
auto-entities
in the search bar. - Click on it and then click Install.
- After installation, add the following to your
ui-lovelace.yaml
or through the Lovelace UI:
resources:
- url: /hacsfiles/lovelace-auto-entities/auto-entities.js
type: module
Navigate to Configuration > Helpers in your Home Assistant dashboard.
- Click the ADD HELPER button.
- Choose Text.
- Give it a name, for example, "DVS License Plate".
- Set the Entity ID to
input_text.dvsportal_license_plate
.
Add the following scripts to your scripts.yaml
file.
dvsportal_parkingreservation_endofday:
sequence:
- service: dvsportal.create_reservation
data_template:
entity_id: "{{ entity_id }}"
license_plate_value: "{{ license_plate_value }}"
date_from: "{{ (now() + timedelta(minutes=1)).isoformat() }}"
date_until: "{{ now().replace(hour=23, minute=59, second=59).isoformat() }}"
create_and_clear_reservation:
sequence:
- service: dvsportal.create_reservation
data_template:
date_from: "{{ (now() + timedelta(minutes=1)).isoformat() }}"
date_until: "{{ now().replace(hour=23, minute=59, second=59).isoformat() }}"
license_plate_value: "{{ states('input_text.dvsportal_license_plate') }}"
- service: input_text.set_value
target:
entity_id: input_text.dvsportal_license_plate
data:
value: none
Reload your scripts after adding these.
- Navigate to Overview > Dashboards.
- Click on the + button to add a new dashboard.
- Choose Manual.
- Paste the following YAML code into the editor.
type: vertical-stack
title: DVS Portal Dashboard
cards:
- type: entities
title: General Info
entities:
- entity: sensor.guest_parking_balance
- entity: sensor.reservations
- type: custom:auto-entities
card:
type: glance
title: Cars without Reservations
filter:
include:
- domain: sensor
attributes:
device_class: dvs_car_sensor
state: not present
options:
tap_action:
action: call-service
service: script.dvsportal_parkingreservation_endofday
service_data:
entity_id: this.entity_id
- type: custom:auto-entities
card:
type: glance
title: Cars with Reservations
filter:
include:
- domain: sensor
attributes:
device_class: dvs_car_sensor
state: /^(reserved|present)$/
options:
tap_action:
action: call-service
service: dvsportal.end_reservation
service_data:
entity_id: this.entity_id
- type: entities
title: New car
entities:
- entity: input_text.dvsportal_license_plate
- entity: script.create_and_clear_reservation
- Save the dashboard.
You should now have a fully functional DVS Portal Dashboard!