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

KString convert to relative time func #614

Merged
merged 4 commits into from
Dec 21, 2023
Merged

KString convert to relative time func #614

merged 4 commits into from
Dec 21, 2023

Conversation

maxwroc
Copy link
Owner

@maxwroc maxwroc commented Dec 21, 2023

Currently relative time is being shown only in case when the KString has only single dynamic value and that value is a date.

With this change we will be able to add relative time values in more complex strings e.g.

secondary_info: "{last_changed|reltime()}, Type: {sensor.my_deivice_battery_type.state}"

In the above example two dynamic values were used together with the static text, where the first dynamic value is being converted to relative time (this was not possible before)

#608

@maxwroc maxwroc added the enhancement New feature or request label Dec 21, 2023
@coveralls
Copy link
Collaborator

coveralls commented Dec 21, 2023

Pull Request Test Coverage Report for Build 7293311474

  • 10 of 10 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+3.2%) to 83.853%

Totals Coverage Status
Change from base Build 7278642938: 3.2%
Covered Lines: 350
Relevant Lines: 400

💛 - Coveralls

@maxwroc maxwroc merged commit 31d8c64 into master Dec 21, 2023
1 check passed
@maxwroc maxwroc deleted the RelTimeKString branch December 21, 2023 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants