Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove dependency on sensor names #1

Closed
peternijssen opened this issue May 1, 2020 · 1 comment
Closed

Remove dependency on sensor names #1

peternijssen opened this issue May 1, 2020 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@peternijssen
Copy link

peternijssen commented May 1, 2020

Hi Hans,

Currently your card is coupled to the names of the sensors in the component. See:
https://github.com/Voxxie/lovelace-jumbo-card/blob/master/jumbo-card.js#L40
https://github.com/Voxxie/lovelace-jumbo-card/blob/master/jumbo-card.js#L69

I am about to rename some of the sensors, which automatically breaks your card. To avoid this in the future, I suggest to let users enter the entities rather than making them depend in the code.

So I suggest something like the following configuration:

- type: 'custom:jumbo-card'
  time_slots: jumbo.time_slots
  deliveries: jumbo.deliveries 
  basket: jumbo.basket

All none required, so if you don't fill it in, you don't display the info.

So if ever names of sensors are changed, it's not breaking your card :)

An example can be found in my old PostNL Lovelace card if you need some guidance:
https://github.com/peternijssen/lovelace-postnl-card/blob/master/src/main.js#L222
https://github.com/peternijssen/lovelace-postnl-card/blob/master/src/main.js#L459

@Voxxie Voxxie self-assigned this May 1, 2020
@Voxxie
Copy link
Owner

Voxxie commented May 2, 2020

I just released v0.2.0 and changed the way a user can define if he want to display curtain parts.
If they don't define the entity, that part isn't shown.

@Voxxie Voxxie closed this as completed May 2, 2020
@Voxxie Voxxie added the enhancement New feature or request label May 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants