Skip to content

Commit

Permalink
Update info.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Marc Forth authored Feb 19, 2020
1 parent f2a2b9f commit e653acf
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion info.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## How it works
This script creates a sensor that a counts down to the next occurrance of a date, like a birthday or anniversary and gives the number of years as an attribute

Requires `python_script:` to be enabled in you configuration
Requires `python_script:` to be enabled in your configuration

## Installation
Copy the Python script in to your `/config/python_scripts` directory or install via HACS.
Expand All @@ -12,6 +12,8 @@ key | required | type | description
`name:` | True | string | Name of the date (eg. John)
`type:` | True | string | Type of date (eg. Birthday)
`date:` | True | string | Date, in format DD/MM/YYYY
`friendly_name:` | False | string | Display name of the sensor
`icon:` | False | string | Icon of the sensor, defaults to 'mdi:calendar-star'

The date can be in the future if you want to countdown to the date itself, and then the anniversaries thereafter.

Expand All @@ -24,6 +26,13 @@ type: TYPE_OF_DATE
date: DD/MM/YYYY_OF DATE
```

You can also customize the sensor icon and friendly names :

```
icon: "mdi:ICON_OF_DATE"
friendly_name: FRIENDLY_NAME_OF_DATE
```

examples:

```
Expand All @@ -38,6 +47,7 @@ or
name: Our wedding
type: anniversary
date: 14/02/1994
icon: "mdi:ring"
```

## Generated sensors
Expand Down Expand Up @@ -91,6 +101,7 @@ automation:
name: Our wedding
type: anniversary
date: 14/02/1994
icon: "mdi:ring"
```
## Example automation
Expand Down

0 comments on commit e653acf

Please sign in to comment.