time_charge_complete notification #870
-
Hi i'm trying to include the "remaining time to complete the charge of my tesla , in a notification and have the following code in the automation service: notify.alexa_media_bedroom_echo_dot the above gives me a Billion and some in Seconds, is there any easier way to just read the remaining time in minutes? before trying the above code, I looked at the code of the STATE of the time_charge_comple and found it was set to device class as below and even showing the remaining time in minutes - but can't seem to get it to work :( device_class: timestamp |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
There is an attribute |
Beta Was this translation helpful? Give feedback.
-
How do I use that?
…On Sat, Feb 24, 2024, 16:32 Stephen Jones ***@***.***> wrote:
There is an attribute minutes_to_full_charge on that sensor which has the
minutes amount. (Saves you trying to do the fun of time manipulation, the
billions of seconds you are getting is the number of seconds since the
epoch I believe)
—
Reply to this email directly, view it on GitHub
<#870 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMTE62IIY6RFRLGODY3CWDDYVIB2FAVCNFSM6AAAAABDYCRH56VHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DKNZXG4YDG>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
great thank you, any chance to get the number of hours remaining to full
charge? other than having to /60 to get the hours?
…On Sat, Feb 24, 2024 at 5:47 PM Stephen Jones ***@***.***> wrote:
For your example it would be state_attr("sensor.tessy_the_beast_time_charge_comple",
"minutes_to_full_charge)
—
Reply to this email directly, view it on GitHub
<#870 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMTE62PTH7PPK2P2UV4XZZDYVIKQPAVCNFSM6AAAAABDYCRH56VHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DKNZYGE2DQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
--
Youssef Bouanani
0033664637768
|
Beta Was this translation helpful? Give feedback.
-
thanks a lot for your help!
yeah i've used the minutes value and divide by 60 - but having trouble
with the decimals and also want to show/hear it as time left : HH hours
and MM minutes. very new to home assistant so need to figure out how to get
the time left in the appropriate format
…On Sat, Feb 24, 2024 at 5:56 PM Stephen Jones ***@***.***> wrote:
Apart from the divide 60 approach, the only other option would be to take
the original sensor and convert it to a timestamp take difference from the
now timestamp and then use the hours from that difference value.
Given you've got a minutes value, I'd say use that unless you want to do
some clever stuff with time
—
Reply to this email directly, view it on GitHub
<#870 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMTE62MB5BLA5XFGVX7SRD3YVILTXAVCNFSM6AAAAABDYCRH56VHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DKNZYGIZDG>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
--
Youssef Bouanani
0033664637768
|
Beta Was this translation helpful? Give feedback.
There is an attribute
minutes_to_full_charge
on that sensor which has the minutes amount. (Saves you trying to do the fun of time manipulation, the billions of seconds you are getting is the number of seconds since the epoch I believe)