Thanks Andrej,
but I want use the sensor that is exposed by the integration with Alexa Echo Dot.
i just need to understand the code that I need to insert on the card configuration.
This won’t work without adding the template sensor first. After that, you can use the resulting entity for your lovelace card. In the code I showed, the template sensor would be named sensor.timer_wohnzimmer. Then you can use the following card:
type: 'custom:circle-sensor-card'
entity: sensor.echo_dot_di_michele_next_timer
name: Alexa Timer
min: 0
max: 100
You can change the max value.
i’ve just copied and pasted your code in the configuration.yaml and I’ve this error on the check.
Invalid config for [sensor]: required key not provided @ data['platform']. Got None. (See /home/pi/.homeassistant/configuration.yaml, line 34).
I have another session in the file called sensor:
Witch platform I need to use?
Thanks
Without seeing what you did in configuration.yaml, I can’t help you.
this is the sensor part
sensor:
- platform: systemmonitor
resources:
- type: disk_use_percent
- type: processor_use
- type: processor_temperature
- platform: time_date
display_options:
- 'time'
- 'date'
- 'date_time'
- 'date_time_utc'
- 'date_time_iso'
- 'time_date'
- 'time_utc'
- 'beat'
sensor:
timer_wohnzimmer:
friendly_name: "Timer Wohnzimmer"
value_template: >
{% if states('sensor.echo_wohnzimmer_next_timer') != 'unavailable' %}
{{ ((as_timestamp(states('sensor.echo_wohnzimmer_next_timer')) - as_timestamp(now()))/60) | int + 1 }}
{% else %}
0
{% endif %}
unit_of_measurement: Minutes
icon_template: hass:timer
Sorry, there was something missing in my reply. Here is the correct code:
sensor:
- platform: systemmonitor
resources:
- type: disk_use_percent
- type: processor_use
- type: processor_temperature
- platform: time_date
display_options:
- 'time'
- 'date'
- 'date_time'
- 'date_time_utc'
- 'date_time_iso'
- 'time_date'
- 'time_utc'
- 'beat'
- platform: template
sensors:
timer_wohnzimmer:
friendly_name: "Timer Wohnzimmer"
value_template: >
{% if states('sensor.echo_dot_di_michele_next_timer') != 'unavailable' %}
{{ ((as_timestamp(states('sensor.echo_dot_di_michele_next_timer')) - as_timestamp(now()))/60) | int + 1 }}
{% else %}
0
{% endif %}
unit_of_measurement: Minutes
icon_template: hass:timer
thanks!!!
Now configuration is ok and I have the new entity
however the result is this one
with this code in the card
type: 'custom:circle-sensor-card'
entity: sensor.echo_dot_di_michele_next_timer
name: Alexa Timer
min: 0
max: 100
font_style:
color: red
font-size: 1.5em
text-shadow: 2px 2px black
font-family: Trebuchet MS
Please replace this with your template sensor. In my code, it was named sensor.timer_wohnzimmer.
Super!!!
with this code this is result!!! Amazing thanks so much
Do you think is possibile also to show the seconds? Or is it too much?
type: 'custom:circle-sensor-card'
entity: sensor.timer_wohnzimmer
name: Alexa Timer
min: 0
max: 60
font_style:
color: Black
font-size: 4em
font-family: Arial
If it should only be a number that should be displayed, then you have to decide between seconds and minutes. Otherwise you have to calculate a timestamp and pass it to the card. I don’t know if the card can visualize timestamps.
Just to confirm you all are getting the timer from the Alexa install in HACS correct?
yes, from HACS
no problem, perfect like this… thanks for your help and have a good holiday.
Anyone having issues with the timer? Used to say “unavailable “ when the timer was done, now it goes negative. And has issues with multiple timers. Screenshot below.
If I set multiple timers the first one just goes below 0 and never shows the second one.
FYI I fixed this had to reset my echo dot.
Hi there,
I use several Dots in my flat - if I understand your code correct, i have to create for each alexa this code?
Eg. Wohnzimmer, Küche, Bad etc?
Or is there a way to include all Alexa dots in one code?
Correct you need to create a sensor for each Echo Dot.
okay thanks…
can you tell me, where I can find the correct names of the echos to add them to the script?
you can find in the list of the entities under Alexa Integration.
sorry, but I cannot find the alexa integration? If I go into settings and home assistant clound -> alexa entities I find some devices but no alexa dots?