-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
Half Anniversary Attributes #34
Comments
I should be able to add these as attributes |
That'd be great! I'm happy to test if you have a dev branch or similar. |
Thanks. I'll let you know when I've got something available |
You can try the Dev branch. Note that this cannot be installed through hacs and will need to be installed manually |
Thanks! Couple observations for the half-birthday part of the request.
|
|
maybe original date + 183 days may be better? but the dates would never line up perfectly month to month? |
lol! yeah... Maybe make it a manual/custom field on creation then people can do whatever they want? |
actually... I think I'm going to have a feb '29th bug anyway... must test that! what do you suggest? a custom date field? (mm-dd) with date +183 as default? |
Well, Another use case would be weekday, especially if the value could be a jinja2 template. This way you don't have to code for weekday, users can do just about anything they wanted. But I dont know enough about how integrations handle data to know if thats possible The simplest may just to do nothing and let users create a template sensor off yours and they can add their own attributes. This is what I do w/ google calendar entries now. I dont love it because its another entity to manage. |
I don't think there's an easy solution to this, other than simply using a template based off the existing. The biggest problem is that the method of defining a half anniversary could mean different things to different people, so I'm going to leave this out |
Further thoughts on this... use relativedelta library... |
@twochannel can you try the latest dev branch please? |
nice! i tested one non-30/31 date and it looks good. I'm not able to edit an existing entry to toggle feature though. I'm on 106.6 and I swear It was there on 104.3. When i click the gear I get the basic entity stuff (override name, disable, and graph). I also dont see how to delete a entry, either in integrations or entities. |
Your integration has been very helpful, thank you for creating and sharing it.
I have a few things for your consideration I wanted to share.
I've been researching how to do this w/ a template in a card but I can't seem to find a straight forward way to do it with the custom cards I've looked into.
secondaryinfo-entity-row Doesn't support jinaj2 templates or timestamp formatting
lovelace-multiple-entity-row Didn't allow me to combine multiple attributes/text on a a row
I have not gone down the path of the other custom card/custom entity value cards yet. The above is about as far as I was wanting to go down the custom card rabbit hole.
That said, what I am trying to do is
I could spawn a template sensor and calculate these in the new entity but I felt others could benefit from them being included. And I try to avoid chains of entities.
In addition to your card I display similar info for upcoming events in my google calendar. For that I used a template sensor to calculate and expose the days-til and then schedule a daily automation to update. If you were looking for other enhancements perhaps there's a way you can refer to an existing sensor to create your sensors in addition to your native events.
Thanks!
The text was updated successfully, but these errors were encountered: