HomeDash.Config (home_dash v0.0.1)
Easy access to HolmeDash config
Examples
# The default welcome card prodiver. This is the Hello World of HomeDash config :home_dash, servers: [{HomeDash.Providers.Welcome, []}]
# Two actions with different providers config :home_dash,
actions: [
welcome: [HomeDash.Providers.Welcome],
brewdash: [HomeDash.Providers.Welcome, HomeDash.Providers.BrewDashTaps]
]
# Two different BrewDash providers, each with a different configuration. config :home_dash,
actions: [
downstairs: [
{HomeDash.Providers.BrewDashTaps, [
server_name: HomeDash.Providers.BrewDashTaps.Upstairs,
taps_url: "https://example.com/api/taps"
]}
]
upstairs: [
{HomeDash.Providers.BrewDashTaps, [
server_name: HomeDash.Providers.BrewDashTaps.Downstairs,
taps_url: "https://other.example.com/api/taps"
]}
]
]
Summary
Functions
List all card providers configured under actions
Gets the provider for the action.
Get the servers from the config.
Functions
Link to this function
all_providers()
List all card providers configured under actions
Link to this function
provider(action)
Gets the provider for the action.
If the action is not defined, fall back to the configured provider servers.
Link to this function
servers()
Get the servers from the config.
Falling back to the providers defined in :actions
and then eventually to the @default_providers module.