Hi all,
I'm trying to format a timedate text_sensor which comes from Home assistant (the start time for low electricity price) to display in a lambda function in an e-ink display. I don't manage to format the string correctly. This is the sensor i have created that receives the right timedate object:
- platform: homeassistant
entity_id: sensor.nord_pool_se3_lowest_price
id: lowestPriceStart
attribute: "start"
device_class: timestamp
internal: true
and the value it receives looks like this:
'sensor.nord_pool_se3_lowest_price::start': Got attribute state '2026-06-25T12:00:00+00:00'
But then I am not able to format it correctly to just display the hours and minutes. This is what I was trying:
it.printf(x+75, y+75, id(update_font), "%s", id(lowestPriceStart).state("%H%M"));
I have, of coursem the definition of the update_font before and I use the font for other text_sensors. I know it must be something with how I should format the text_sensor, but I don't seem to get it right. Any hints?
Thanks for any help!
/Nacho