#Pre-Create Dashboards

1 messages · Page 1 of 1 (latest)

stark sequoia
#

So, my situation is, I am setting.up HA for a new construction client.

We've paired a fair few of their devices, but not everything yet. I am starting to lay out some custom dashboard layouts, however I've been running into the issue of, How can I really create widgets for entities that don't exist yet...it's becoming less painful as more devices get added but I thought I couldn't be the first to be in this situation..

So how do y'all handle this? Just write yaml and maybe fill in the entities later or..?

cloud peak
# stark sequoia So, my situation is, I am setting.up HA for a new construction client. We've pa...

Just create some dummy entities that can be used as a placeholder. Put them all in a package like in the following example. They can be used in all your new projects:

---
###############################################################################
## Dummy entities 
##
## This file provides some dummy entities to help in designing your new 
## dashboard. 
##
## Put this file into the /config/packages folder and add the following 
## lines to your config file:
##
##[configuration.yaml]
##| homeassistant:
##|  packages: !include_dir_named packages/
##
##
template:
  # Weather
  - weather:
      - name: "Dummy Weather Station"
        unique_id: dummy_weather_station
        condition_template: "{{ 'partlycloudy' }}"
        temperature_template: "{{ states('sensor.dummy_outside_temperature') }}"
        temperature_unit: "°C"
        humidity_template: "{{ states('sensor.dummy_outside_humidity') }}"
        forecast_daily_template: "{{ state_attr('weather.dummy_weather_station', 'forecast_data') }}"
  # General sensors
  - sensor:
      # Living room 
      - name: Dummy Living Temperature
        unique_id: dummy_living_temperature
        state: "{{ range(15, 40) | random }}"      
        state_class: measurement
        device_class: temperature
        unit_of_measurement: '°C'
      - name: Dummy Living Humidity
        unique_id: dummy_living_humidity    
        device_class: humidity
        state_class: measurement
        state: "{{ range(0, 90) | random }}"      
        unit_of_measurement: '%'
      # Kitchen
      ...
  # Lights
  - light:
      # Living room
      - name: Dummy Living Lights
        unique_id: dummy_living_lights
        level: "{{ '100' }}"
        state: "{{ 'on' }}"
        temperature: "{{ '200' }}"
        turn_on:
        turn_off:
        set_level:
        set_temperature:
        set_hs:
...

The above is just an extract of a bigger file. The dummy entities can later easily be replaced by the real ones.