Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use time display option instead of date_time #28

Merged
merged 5 commits into from
May 13, 2023

Conversation

itsabdelrahman
Copy link
Contributor

Home Assistant's Time & Date integration already supports the time format, so one doesn't have to use the date_time format and then extract the time manually using split.

Hours & minutes

{{ states("sensor.date_time").split(" ")[1] }} {# 08:37 #}
{{ states("sensor.time") }} {# 08:37 #}

Minutes

{{ states("sensor.date_time").split(":")[1] }} {# 37 #}
{{ states("sensor.time").split(":")[1] }} {# 37 #}

@itsabdelrahman itsabdelrahman changed the title Use sensor.time display option instead of sensor.date_time Use time display option instead of date_time Apr 2, 2023
@ibrahim-zehhaf-mawaqit
Copy link
Contributor

@itsabdelrahman could you please fix the conflict

@ibrahim-zehhaf-mawaqit
Copy link
Contributor

@hajtux could you please check this PR and test it

@ibrahim-zehhaf-mawaqit ibrahim-zehhaf-mawaqit merged commit 4973a16 into mawaqit:master May 13, 2023
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants