Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
nielsfaber authored Aug 30, 2020
1 parent ba84c3d commit df78953
Showing 1 changed file with 48 additions and 24 deletions.
72 changes: 48 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ HACS installation:

```yaml
resources:
- url: /local/scheduler-card/scheduler-card.js?v=0
- url: /local/scheduler-card/dist/scheduler-card.js?v=0
type: module
```
Expand All @@ -45,39 +45,59 @@ resources:
```
## Updating
### Updating via HACS
HACS should auto-remind you in the HACS tab when an update is available.
HACS should auto-remind you in the HACS tab when an update is available. Use `git pull` for manual installation updates.
### Updating manually
Use `git pull` for manual installation updates.

## Options
Since most browsers will cache the Lovelace card code, you can force a refresh of the browser by editing the entry in the `resources:` section in `ui-lovelace.yaml`, by updating the version to `?v=(n+1)` (where `n` the current value).

## Configuration options
Configuration is not mandatory.
Out of the box, the card should be able to find all your `light`, `cover`, `switch` and `climate` entities with some basic actions.
If you want to use other entities and/or actions, then keep reading.

| Name | Type | Default | Description
| ---- | ---- | ------- | -----------
| ---- | ---- | ------- | -----------
| type | string | **Required** | `custom:scheduler-card`
| domains | map | none | See [domains](#domains)
| entities | map | none | See [entities](#entities)
| groups | map | none | See [groups](#groups)
| discoverExisting | boolean | True | Always show the existing schedules, also if the related entities are not included in the configuration.
| standardConfiguration | boolean | True | Automatically list `light`, `cover`, `switch` and `climate` entities if no configuration is provided.

## Domains
The `domain:` option defines the entity domains that are available for choosing when creating a scheduler item.
By defining one or more actions for the domain, all entities in home assistant under this domain will become available for choosing in combination with the actions.
With the `domain:` option, you can specify configuration options for all entities in HA of the same type (domain).

| Name | Type | Default | Description
| ---- | ---- | ------- | -----------
| domain | key | **Required** | Entity domain from home assistant
| actions | list | **Required** | See actions
| actions | list | none | See [actions](#actions)
| group | string | none | Group under which the entities need to be displayed
| icon | string | none | Displayed icon for entities in the domain (overwrites HA config)

## Entities
The `entities:` option defines the individual entities that are available for choosing when creating a scheduler item.
By defining one or more actions for the entity, these will become available for choosing in combination with the entity.
The entity configuration may be used to overrule the domain configuration.
Example:
if you want to be able to turn on/turn off different lamps in your house, you could add the following:
```yaml
domains:
light:
name: My lamps
actions:
- service: turn_on
- service: turn_off
```

### Entities
With the `entities:` option you can specify configuration for a single entity in HA.

Note: you can use this in combination with `domain` configuration, the configurations will be merged.

| Name | Type | Default | Description
| ---- | ---- | ------- | -----------
| entity | key | **Required** | Entity id from home assistant
| actions | list | none | See actions
| actions | list | none | See [actions](#actions)
| name | string | (take from HA config) | Displayed name for entity
| icon | string | (take from HA config) | Displayed icon for entity

Expand All @@ -93,33 +113,37 @@ entities:
brightness: 100
name: "Turn on at 40%"
icon: lightbulb-on-outline
- service: turn_off
icon: lightbulb-off-outline
```

## Groups
The `groups:` option provides the capability of organizing the entities.
### Groups
The `groups:` option provides the capability of organizing the entities.

By default, entities will be grouped based on their `domain`, but you can change this as you wish.

Make sure that the `entities` and `domains` in your groups are also included in their specific configurations.
| Name | Type | Default | Description
| ---- | ---- | ------- | -----------
| group_id | key | **Required** | Identifier for group
| name | string | (same as group_id) | Displayed name for group
| icon | string | "folder" | Displayed icon for group
| icon | string | none | Displayed icon for group
| entities | list | none | [entities](#entities) to be added in this group
| domains | list | none | [domains](#domains) to be added in this group

Example:
```yaml
groups:
lights:
name: "Lighting"
icon: lightbulb
lights:
name: "Lighting"
icon: lightbulb
domains: [light]
```
## Action
### Action
The actions define what needs to be done when a scheduler timer is expired.
Actions are linked to their entities, so the entity ID is send together with the service call.
Actions are linked to their entities, so the entity ID is send together with the service call (it is not needed to add this to the `service_data`.

| Name | Type | Default | Description
| ---- | ---- | ------- | -----------
| service | string | **Required** | `Service to be executed
| service | string | **Required** | Service to be executed
| service_data | map | none | Additional parameters for the service call
| name | string | (take from service) | Displayed name for action
| name | string | (same as service) | Displayed name for action
| icon | string | "flash" | Displayed icon for action

0 comments on commit df78953

Please sign in to comment.