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

Feature Extension #3

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open

Feature Extension #3

wants to merge 16 commits into from

Conversation

hasechris
Copy link

Hi :)

i found your excellent HA Autoupdate automation - was trying to do that myself but really struggled with it, so was really happy to found yours.

I found some features missing and decided to just add those in my fork. PR now so maby we can get them into the main repo so all other HA users could use them.

Added features:

  • backup time can be specified (default is still one hour)
  • backup location can now be explicitly specified
  • changed restart logic - see line 1202. changed the and to an or so if the ha admin requests a forced restart via the blueprint gui we always make a restart.
  • Toggle Helper for determination if backup process has started - because of this we only make one backup before one complete update process (including reboots inbetween)
  • schedule_monthday -> schedule_earliest_monthday
  • also new selector schedule_latest_monthday - this opens the possibility to define updates to only specific day in the month (selecting e.g. a saturday in schedule and from day 7 to day 14 so only updating on the second saturday of the month)
  • update_inclusion_mode - explanation below
  • update_inclusion_entity_list - if selected in the inclusion_mode, build the update_list from this entity list (user-specified)
  • update_inclusion_entity_searchfilter - if selected in the inclusion_mode, build the update_list from all update entities which are on, but search for entities which contain the searchfilter
  • telegram notifications

Update Inclusion Mode

All

This is just the mode which was used up until now to build the update_list.

Specified

This uses the additional entity selector so the user can just specify which update entities should be used to build the update_list. But the normal filtering is then still made.

Specified-Single

Same as Specified, but only the first item from the list.

Searchfilter

This works like a wildcard. Assume you have the following update entities in your HA:

  • update.zigbee2mqtt_temp_kitchen
  • update.zigbee2mqtt_temp_bath
  • update.zigbee2mqtt_temp_bedroom
  • update.zigbee2mqtt_trv_kitchen
  • update.zigbee2mqtt_trv_bath
  • update.zigbee2mqtt_trv_bedroom
  • update.unifi_ap_firstfloor
  • update.unifi_ap_secondfloor
  • update.unifi_ap_thirdfloor
  • update.unifi_switch_office
  • update.unifi_switch_firstfloor

Now you can create to autoupdate automations with the following searchfilters:

  • first automation: update.zigbee2mqtt_temp
  • second automation: update.unifi_ap

The first automation will update all Zigbee Temp sensors, the second automation will only update all Unifi Wifi access points.

Searchfilter-Single

Same as Searchfilter, but only the first item from the list.

Best regards
Chris Hase

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant