Rename time trigger 'after' to 'at'#7846
Conversation
|
@armills, thanks for your PR! By analyzing the history of the files in this pull request, we identified @balloob, @fabaff and @robbiet480 to be potential reviewers. |
|
I agree, it's confusing. Typing If we want to clean up all of these, maybe #7170 should be considered at the same time? |
|
Ah, good catch. I agree with that as well. I'll try and get out a PR today, since it would be nice if we could get all of our trigger refactoring into 0.46. Should just be a matter of fixing here: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/helpers/condition.py#L169-L173 |
|
Can we think of a use case that would require the old logic? I'm wondering if we should also include the keywords |
|
I have that same feeling but cannot think of an example off the top of my head. |
|
Opened #7857 for discussion. |
|
Did you leave backward compatibility? Supporting at and after would be nice, at least for a few revision, this will break too much configuration and to handle both keyword it mustn't be too hard, or? |
|
Read either the PR description or the code… |
|
@RiRomain Yes, there is currently backward compatibility. A warning will be issued in the logs if the old name is detected. |
|
@RiRomain It is mentioned right the description
|
This reverts commit 44ce317.
Description:
This PR renames the time trigger 'after' option to 'at'.
In #7556, implemented with #7651, we decided it's too confusing to try and force the trigger configuration names to match the condition names. Similarly, 'after' as a trigger name isn't exactly intuitive. This PR proposes to change it to 'at'. I'm also open to other ideas for the name if someone has a better idea, but it should at least be better than 'after'.
CC @amelchio
Breaking change
For time triggers,
afteris deprecated and replaced withat.Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.io#2731
Example entry for
configuration.yaml(if applicable):