Anniversaries
Anniversaries copied to clipboard
Using 'Day' instead of 'Days' for remaining days 0 and 1
First of all, kudos to you for this awesome integration. The only issue that I see that it shows unit of measurement "Days" instead of "Day" even when 'daysRemaining' is 1 or 0. I know this is not a big thing, however please consider this as a feature request. For now, as a workaround, I modified the "sensor.py" file as below :
if daysRemaining <= 1:
self._icon = self._icon_today
self._unit_of_measurement = "Day"
However, whenever I'll update this integration from HACS it might replace that code. It would be great if you can incorporate this with in your code. Nevertheless, thanks a lot for your efforts.
This was actually removed with the release of version 3.0.0, when the option to configure the name of the unit of measurement was introduced. The problem is that the unit of measurement is not translatable, and so days was replaced with a single configurable option to allow people to have the unit displayed in their own language. It doesn't seem to be worth adding an extra config option for a singular for unit of measurement, when it would only be applied one day in each year
That’s a shame
Previous comment deleted... Wrong thread