Skip to content

Commit

Permalink
feat: mimic internal backup naming scheme instead of showing 'Unknown'
Browse files Browse the repository at this point in the history
  • Loading branch information
jcwillox committed Aug 9, 2022
1 parent 7dfa7aa commit ba1668a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/auto_backup/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
is_hassio,
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import ATTR_NAME
from homeassistant.const import ATTR_NAME, __version__
from homeassistant.core import HomeAssistant, callback
from homeassistant.exceptions import HomeAssistantError
from homeassistant.helpers.aiohttp_client import async_get_clientsession
Expand Down Expand Up @@ -280,7 +280,7 @@ def match_folder(folder):

def generate_backup_name(self) -> str:
if not self._supervised:
return "Unknown"
return f"Core {__version__}"
time_zone = dt_util.get_time_zone(self._hass.config.time_zone)
return datetime.now(time_zone).strftime("%A, %b %d, %Y")

Expand Down

0 comments on commit ba1668a

Please sign in to comment.