iammexx / home-assistant-config

Files for my Home Assistant setup
75 stars 77 forks source link

readme issue #15

Closed jschwalbe closed 5 years ago

jschwalbe commented 5 years ago

Hello - Just got it working but it took quite a bit of fiddling. This was my first custom card (or any card), so I was learning from the README. That being said, I needed to do something other than what it said and my ui-lovelace.yaml file needed to look like this:

resources:
  - url: /local/custom_ui/dark-sky-weather-card.js?v=7.1
    type: module

title: Home Assistant
views:
  - id: weather
    title: Weather
    cards:
      - type: 'custom:dark-sky-weather-card'
        entity_current_conditions: sensor.dark_sky_icon
        entity_temperature: sensor.dark_sky_temperature
        entity_forecast_high_temp_1: sensor.dark_sky_daytime_high_temperature_1
        entity_forecast_high_temp_2: sensor.dark_sky_daytime_high_temperature_2
        entity_forecast_high_temp_3: sensor.dark_sky_daytime_high_temperature_3
        entity_forecast_high_temp_4: sensor.dark_sky_daytime_high_temperature_4
        entity_forecast_high_temp_5: sensor.dark_sky_daytime_high_temperature_5
        entity_forecast_icon_1: sensor.dark_sky_icon_1
        entity_forecast_icon_2: sensor.dark_sky_icon_2
        entity_forecast_icon_3: sensor.dark_sky_icon_3
        entity_forecast_icon_4: sensor.dark_sky_icon_4
        entity_forecast_icon_5: sensor.dark_sky_icon_5
        entity_forecast_low_temp_1: sensor.dark_sky_overnight_low_temperature_0
        entity_forecast_low_temp_2: sensor.dark_sky_overnight_low_temperature_1
        entity_forecast_low_temp_3: sensor.dark_sky_overnight_low_temperature_2
        entity_forecast_low_temp_4: sensor.dark_sky_overnight_low_temperature_3
        entity_forecast_low_temp_5: sensor.dark_sky_overnight_low_temperature_4
        entity_summary_1: sensor.dark_sky_summary_1
        entity_summary_2: sensor.dark_sky_summary_2
        entity_summary_3: sensor.dark_sky_summary_3
        entity_summary_4: sensor.dark_sky_summary_4
        entity_summary_5: sensor.dark_sky_summary_5
iammexx commented 5 years ago

The title, and views tags are part of Lovelace and can be whatever you want. They have nothing to do with the card itself. In fact, you will likely end up with many views as each one is it's own page. The id tag is just a unique identifier for Lovelace to use when using the built in editors. If you use the built in editors it will assign the ID for you.

The Readme for the card only show what is necessary for the card itself not how to configure Lovelace.