Skip to content

Commit

Permalink
Add migration guide note
Browse files Browse the repository at this point in the history
  • Loading branch information
boralyl committed Apr 11, 2020
1 parent 9603c31 commit 4d3b022
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 1 deletion.
53 changes: 53 additions & 0 deletions MIGRATION_TO_V3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Migration Guide to v3.0.0

There were a few breaking changes introduced in `v3.0.0`. This guide will
document the changes and what you will need to fix to make the integration work
if you previously had an older version installed.

## Configuration

Before `v3.0.0` configuration was done as a platform. This was changed to now
simply be a top level configuration in your `configuration.yaml`. See the example
below of the old configuration and what it should look like in `v3.0.0`.

```yaml
# Old config prior to v3.0.0
sensor:
- platform: nintendo_wishlist
country: US
wishlist:
- Katana ZERO
- OKAMI HD
- Salt and Sanctuary
- Dead Cells
- Bloodstained
- Dark Souls
- Velocity X
- "The Legend of Zelda: Breath of the Wild"

# New config in v3.0.0
nintendo_wishlist:
country: US
wishlist:
- Katana ZERO
- OKAMI HD
- Salt and Sanctuary
- Dead Cells
- Bloodstained
- Dark Souls
- Velocity X
- "The Legend of Zelda: Breath of the Wild"
```
## Sensors
Prior to `v3.0.0` a `sensor` was created for each game in your wishlist. It's
state would be `0` if it was not on sale and `1` if it was on sale. Now instead
of a `sensors`, each game on your wishlist will create a `binary_sensor`. The
state will be `true` if the game is on sale and `false` if it is not on sale.

### Attributes

The attribute `on_sale` for each `binary_sensor` on your wishlist was renamed to
`matches`. If you have automations using the old `on_sale` attribute, you will
need to rename it to `matches`.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
[![hacs_badge](https://img.shields.io/badge/HACS-Default-orange.svg?style=for-the-badge)](https://github.com/custom-components/hacs)
[![](https://img.shields.io/github/license/custom-components/sensor.nintendo_wishlist?style=for-the-badge)](LICENSE)

#### NOTE: This component currently only works in certain countries. See [Supported Countries](#supported-countries) below.
> **_NOTE:_** This component currently only works in certain countries. See [Supported Countries](#supported-countries) below.
> **_Migrating to v3?_** See the [migration guide](./MIGRATION_TO_V3.md).
Home Assistant component that keeps track of Nintendo Switch games that are on
sale on your wish list in home assistant.
Expand Down

0 comments on commit 4d3b022

Please sign in to comment.