Skip to content

Instantly share code, notes, and snippets.

@Snipercaine
Created May 29, 2020 17:54
Show Gist options
  • Save Snipercaine/ddd8e57625f703958db7ba150ecb4be2 to your computer and use it in GitHub Desktop.
Save Snipercaine/ddd8e57625f703958db7ba150ecb4be2 to your computer and use it in GitHub Desktop.
entity: sensor.adensville_charging_status
icon: 'mdi:car'
show_state: false
spin: false
state:
- color: yellow
spin: true
value: charging
- color: green
value: plugged
- color: red
styles:
card:
- animation: blink 2s ease infinite
value: standby
type: 'custom:button-card'
@Mike144007
Copy link

Hope the wedding went well !
Having messed around with this button, I have become well and truly lost, and am not sure where else to ask - I did try the forum, but think I explained what I was trying to do very badly, and so no responses.
Basically I want the card (for my Tesla) to display differently based on:

  • current level of charge (green for 150km+, yellow for 100-150km and red for 100km-)
  • whether it is currently charging ('charging_state") - disconnected no spin, connected spin (and maybe change the icon to mdi:ev-station)
  • whether a new charge is urgent. Animated blink, as you have, but only if the current charge level is 100km-, regardless of whether it the charger is connected or not
    I think I am getting the very basics wrong, as I cannot even get the icon to be green, even when I try to reduce the complication and only include two charging levels, no spinning, no blinking.
    As there are two entities involved, I am not sure whether to start the card with the charging state sensor or the range sensor
    I know you have a lot of work on after the wedding, but any time in the future you might be able to take a look would be very much appreciated.

@Snipercaine
Copy link
Author

I'd like to help you with this.
ping me on discord and we'll work on it together.
Send me what you have that isn't working first and we'll go from there.

@Mike144007
Copy link

Mike144007 commented Jun 27, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment