JonasJoKuJonas / homeassistant-WebUntis

Custom component to access data from Web Untis in Home Assistant
https://community.home-assistant.io/t/webuntis-timetable-in-ha/568273
MIT License
52 stars 12 forks source link

sensor.xxx_todays_school_end shows hours until event instead of time #143

Closed bill340 closed 1 month ago

bill340 commented 1 month ago

The problem

If I show the sensor for today's school end in a card, it shows me how long until school end. (e.g. 7 hours) But I would like to see at what time the school ends today. (e.g. 2:30pm) without the date.

Version of Home Assistant?

2024.9.1

What type of installation are you running?

Home Assistant Container

Version of WebUntis

v1.2.0

Last working WebUntis version

No response

Traceback/Error logs

No response

Additional information

No response

JonasJoKuJonas commented 1 month ago

This is not an issue on my integration. You have to use a other card or a template to show the time. The normal entities card will show the Time untill. Use the entity card or get the time via a template. IMG_0179

type: entity
    entity: sensor.jonas_kuehn_today_school_end
type: entities
entities:
  - entity: sensor.jonas_kuehn_today_school_end
bill340 commented 1 month ago

Thank you very much!! Is it possible to show the time without the date? As it is always today?

JonasJoKuJonas commented 1 month ago

use this template {{ as_timestamp(states('sensor.jonas_kuehn_today_school_end')) | timestamp_custom('%H:%M') }}

bill340 commented 1 month ago

Thats it!!! THANK YOU SO MUCH!!! Also for your great work!!