Advertisement
elradix

Package hass updates

Oct 30th, 2020 (edited)
397
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 22.78 KB | None | 0 0
  1. ###### kaart gedeelte #####
  2.  
  3. - type: markdown
  4.   style: |
  5.     ha-card {background: var(--card-background-color);}
  6.     .card-header {color: var(--primary-color);font-weight: bold;
  7.      border-radius: 15px;
  8.      box-shadow: none;
  9.      }
  10.   content: |
  11.    <ha-icon icon="mdi:home-assistant"></ha-icon>&nbsp;**Add-ons needing update:** &nbsp;&nbsp; {{ states.sensor.supervisor_updates.state }}
  12.  
  13.     > {% for addon in states.sensor.supervisor_updates.attributes.addons %}
  14.     > {{ addon.name }}&nbsp; {{ addon.version }} -> {{ addon.version_latest }}
  15.     > {% endfor %}
  16.  
  17.     <ha-icon icon="hacs:hacs"></ha-icon>&nbsp;**HACS updates available:** &nbsp;&nbsp; {{ states.sensor.hacs.state }}
  18.  
  19.     > {% for repo in states.sensor.hacs.attributes.repositories %}
  20.     >    **{{ repo.display_name }}** _{{ repo["installed_version"] }}_ -> _{{ repo["available_version"] }}_
  21.     > {% endfor %}
  22.     ---
  23.     |          |    Current&nbsp;&nbsp;&nbsp;                                                     |   Latest  |
  24.     |---                |:---:                                                            |:---:          |
  25.    | **Supervisor**&nbsp;&nbsp;&nbsp;    | {{ states.sensor.supervisor_updates.attributes.current_version }} | {{ states.sensor.supervisor_updates.attributes.newest_version }} |
  26.     | **Hassio**        | {{ states.sensor.current_version.state}} | {{ states.sensor.latest_version.state }} |
  27.     | **HassOS**        | {{ states.sensor.hassos_updates.attributes.current_version }} | {{ states.sensor.hassos_updates.attributes.newest_version }} |
  28.     | **Audio**         | {{ states.sensor.updater_audio.attributes.current_version }} | {{ states.sensor.updater_audio.attributes.newest_version }} |
  29.     | **CLI**           | {{ states.sensor.updater_cli.attributes.current_version }} | {{ states.sensor.updater_cli.attributes.newest_version }} |
  30.     | **DNS**           | {{ states.sensor.updater_dns.attributes.current_version }} |  {{ states.sensor.updater_dns.attributes.newest_version }} |
  31.     | **Multicast**     | {{ states.sensor.updater_multicast.attributes.current_version }} |  {{ states.sensor.updater_multicast.attributes.newest_version }} |
  32.  
  33. ##########################
  34.  
  35.  
  36. ###### start Package ######
  37.  
  38. sensor:
  39.  # Sensor to track available updates for supervisor & addons
  40.   - platform: command_line
  41.     name: Supervisor updates
  42.     command: 'curl http://supervisor/supervisor/info -H "Authorization: Bearer $(printenv SUPERVISOR_TOKEN)" | jq ''{"newest_version":.data.version_latest,"current_version":.data.version,"update_available":.data.update_available,"addons":[.data.addons[] | select(.update_available)]}'''
  43.     value_template: "{{ value_json.addons | length }}"
  44.     unit_of_measurement: pending update(s)
  45.     json_attributes:
  46.    - update_available
  47.     - newest_version
  48.     - current_version
  49.     - addons
  50.   # Sensors to track updates to other core components (audio, dns, CLI and multicast)
  51.   - platform: command_line
  52.     name: Updater Audio
  53.     command: 'curl http://supervisor/audio/info -H "Authorization: Bearer $(printenv SUPERVISOR_TOKEN)" | jq ''{"newest_version":.data.version_latest,"current_version":.data.version, "update_available":.data.update_available}'''
  54.     value_template: "{% if value_json.update_available %}on{% else %}off{% endif %}"
  55.     json_attributes:
  56.    - update_available
  57.     - newest_version
  58.     - current_version
  59.   - platform: command_line
  60.     name: Updater DNS
  61.     command: 'curl http://supervisor/dns/info -H "Authorization: Bearer $(printenv SUPERVISOR_TOKEN)" | jq ''{"newest_version":.data.version_latest,"current_version":.data.version, "update_available":.data.update_available}'''
  62.     value_template: "{% if value_json.update_available %}on{% else %}off{% endif %}"
  63.     json_attributes:
  64.    - update_available
  65.     - newest_version
  66.     - current_version
  67.   - platform: command_line
  68.     name: Updater CLI
  69.     command: 'curl http://supervisor/cli/info -H "Authorization: Bearer $(printenv SUPERVISOR_TOKEN)" | jq ''{"newest_version":.data.version_latest,"current_version":.data.version, "update_available":.data.update_available}'''
  70.     value_template: "{% if value_json.update_available %}on{% else %}off{% endif %}"
  71.     json_attributes:
  72.    - update_available
  73.     - newest_version
  74.     - current_version
  75.   - platform: command_line
  76.     name: Updater Multicast
  77.     command: 'curl http://supervisor/multicast/info -H "Authorization: Bearer $(printenv SUPERVISOR_TOKEN)" | jq ''{"newest_version":.data.version_latest,"current_version":.data.version, "update_available":.data.update_available}'''
  78.     value_template: "{% if value_json.update_available %}on{% else %}off{% endif %}"
  79.     json_attributes:
  80.    - update_available
  81.     - newest_version
  82.     - current_version
  83.   - platform: command_line
  84.     name: Updater Observer
  85.     command: 'curl http://supervisor/observer/info -H "Authorization: Bearer $(printenv SUPERVISOR_TOKEN)" | jq ''{"newest_version":.data.version_latest,"current_version":.data.version, "update_available":.data.update_available}'''
  86.     value_template: "{% if value_json.update_available %}on{% else %}off{% endif %}"
  87.     json_attributes:
  88.    - update_available
  89.     - newest_version
  90.     - current_version
  91.   # Alternate updater sensor for core since binary_sensor.updater is very slow to recognize updates
  92.   - platform: command_line
  93.     name: Updater Core
  94.     command: 'curl http://supervisor/core/info -H "Authorization: Bearer $(printenv SUPERVISOR_TOKEN)" | jq ''{"newest_version":.data.version_latest,"current_version":.data.version, "update_available":.data.update_available}'''
  95.     value_template: "{% if value_json.update_available %}on{% else %}off{% endif %}"
  96.     json_attributes:
  97.    - update_available
  98.     - newest_version
  99.     - current_version  
  100.   # Hass OS version
  101.   - platform: command_line
  102.     name: Hassos updates
  103.     command: >
  104.       curl http://supervisor/os/info -H "Authorization: Bearer $(printenv SUPERVISOR_TOKEN)" | jq '{"newest_version":.data.version_latest,"current_version":.data.version}'
  105.    value_template: >
  106.      {% if value_json.newest_version != value_json.current_version %}on
  107.      {% else %}off
  108.      {% endif %}
  109.    json_attributes:
  110.      - newest_version
  111.      - current_version
  112.  
  113. binary_sensor:
  114.  # True if there's updates available for any HACS components, Addons or the Host
  115.  - platform: threshold
  116.    name: Updater HACS
  117.    entity_id: sensor.hacs
  118.    upper: 0.5
  119.  - platform: threshold
  120.    name: Updater Addons
  121.    entity_id: sensor.supervisor_updates
  122.    upper: 0.5
  123.  - platform: threshold
  124.    name: Updater Host
  125.    entity_id: sensor.host_updates
  126.    upper: 0.5
  127.  
  128.  - platform: template
  129.    sensors:
  130.      # True if there's an update available for supervisor
  131.      updater_supervisor:
  132.        friendly_name: 'Updater Supervisor'
  133.        device_class: problem
  134.        value_template: "{{ state_attr('sensor.supervisor_updates', 'update_available') }}"
  135.        availability_template: "{{ states('sensor.supervisor_updates') | int(-1) > -1 }}"
  136.  
  137. alert:
  138.  # Update is available - un-acknowledgeble, auto-dismiss, me only
  139.  # Wait 5 minutes before first to give core config check time to run
  140.  ha_update_available:
  141.    name: HA has an update
  142.    entity_id: sensor.updater_core
  143.    state: 'on'
  144.    can_acknowledge: false
  145.    repeat:
  146.    - 5
  147.    - 360
  148.    skip_first: true
  149.    title: 'Update for HA available'
  150.    message: "New version is {{ state_attr('sensor.updater_core', 'newest_version') }}. Currently on {{ state_attr('sensor.updater_core', 'current_version') }}"
  151.    notifiers:
  152.       - dageraad
  153.    data:
  154.      tag: 'ha-update-available'
  155.      url: 'http://hassio.lan:8123/hassio/addon/core_check_config'
  156.  
  157.  # Supervisor update is available - un-acknowledgeable, auto-dismiss, me only
  158.  supervisor_update_available:
  159.    name: Supervisor has an update
  160.    entity_id: binary_sensor.updater_supervisor
  161.    state: 'on'
  162.    can_acknowledge: false
  163.    repeat: 360
  164.    title: 'Update for HA Supervisor available'
  165.    message: "New version is {{ state_attr('sensor.supervisor_updates', 'newest_version') }}. Currently on {{ state_attr('sensor.supervisor_updates', 'current_version') }}"
  166.    notifiers:
  167.      - dageraad
  168.    data:
  169.      tag: 'supervisor-update-available'
  170.      url: 'http://hassio.lan:8123/hassio/dashboard'
  171.  
  172.  # Audio update is available - un-acknowledgeable, auto-dismiss, me only
  173.  audio_update_available:
  174.    name: Audio has an update
  175.    entity_id: sensor.updater_audio
  176.    state: 'on'
  177.    can_acknowledge: false
  178.    repeat: 360
  179.    title: 'Update for HA Audio available'
  180.    message: "New version is {{ state_attr('sensor.updater_audio', 'newest_version') }}. Currently on {{ state_attr('sensor.updater_audio', 'current_version') }}"
  181.    notifiers:
  182.       - dageraad
  183.    data:
  184.      tag: 'audio_update_available'
  185.      url: 'http://hassio.lan:8123/hassio/dashboard'
  186.  
  187.  # DNS update is available - un-acknowledgeable, auto-dismiss, me only
  188.  dns_update_available:
  189.    name: DNS has an update
  190.    entity_id: sensor.updater_dns
  191.    state: 'on'
  192.    can_acknowledge: false
  193.    repeat: 360
  194.    title: 'Update for HA DNS available'
  195.    message: "New version is {{ state_attr('sensor.updater_dns', 'newest_version') }}. Currently on {{ state_attr('sensor.updater_dns', 'current_version') }}"
  196.    notifiers:
  197.       - dageraad
  198.    data:
  199.      tag: 'dns_update_available'
  200.      url: 'http://hassio.lan:8123/hassio/dashboard'
  201.  
  202.  # CLI update is available - un-acknowledgeable, auto-dismiss, me only
  203.  cli_update_available:
  204.    name: CLI has an update
  205.    entity_id: sensor.updater_cli
  206.    state: 'on'
  207.    can_acknowledge: false
  208.    repeat: 360
  209.    title: 'Update for HA CLI available'
  210.    message: "New version is {{ state_attr('sensor.updater_cli', 'newest_version') }}. Currently on {{ state_attr('sensor.updater_cli', 'current_version') }}"
  211.    notifiers:
  212.      - dageraad
  213.    data:
  214.      tag: 'cli_update_available'
  215.      url: 'http://hassio.lan:8123/hassio/dashboard'
  216.  
  217.  # Multicast update is available - un-acknowledgeable, auto-dismiss, me only
  218.  multicast_update_available:
  219.    name: Multicast has an update
  220.    entity_id: sensor.updater_multicast
  221.    state: 'on'
  222.    can_acknowledge: false
  223.    repeat: 360
  224.    title: 'Update for HA Multicast available'
  225.    message: "New version is {{ state_attr('sensor.updater_multicast', 'newest_version') }}. Currently on {{ state_attr('sensor.updater_multicast', 'current_version') }}"
  226.    notifiers:
  227.       - dageraad
  228.    data:
  229.      tag: 'multicast_update_available'
  230.      url: 'http://hassio.lan:8123/hassio/dashboard'
  231.  
  232.  # Observer update is available - un-acknowledgeable, auto-dismiss, mike only
  233.  observer_update_available:
  234.    name: Observer has an update
  235.    entity_id: sensor.updater_observer
  236.    state: 'on'
  237.    can_acknowledge: false
  238.    repeat: 360
  239.    title: 'Update for HA Observer available'
  240.    message: "New version is {{ state_attr('sensor.updater_observer', 'newest_version') }}. Currently on {{ state_attr('sensor.updater_observer', 'current_version') }}"
  241.    notifiers:
  242.    - dageraad
  243.    data:
  244.      tag: 'observer_update_available'
  245.      url: 'http://hassio.lan:8123/hassio/dashboard'
  246.  
  247.  # HACS repos have updates available - unacknowledgeable, auto-dismiss, me only
  248.  hacs_update_available:
  249.    name: HACS repos have updates
  250.    entity_id: binary_sensor.updater_hacs
  251.    state: 'on'
  252.    can_acknowledge: false
  253.    repeat: 360
  254.    message: "Updates available in {{ states('sensor.hacs') }} HACS repo{% if states('sensor.hacs') | int > 1 %}s{% endif %}"
  255.     title: "HACS"
  256.     notifiers:
  257.      - dageraad
  258.     data:
  259.        tag: 'hacs-update-available'
  260.        url: 'http://hassio.lan:8123/hacs/installed'
  261.  
  262.   # Addons have updates available - unacknowledgeable, auto-dismiss, me only
  263.   addon_update_available:
  264.     name: Addons have updates
  265.     entity_id: binary_sensor.updater_addons
  266.     state: 'on'
  267.     can_acknowledge: false
  268.     repeat: 360
  269.     message : "Updates available for {{ states('sensor.supervisor_updates') }} HA addon{% if states('sensor.supervisor_updates') | int > 1 %}s{% endif %}"
  270.     title: "Addons"
  271.     notifiers:
  272.       - dageraad
  273.     data:
  274.       tag: 'addon-update-available'
  275.       url: 'http://hassio.lan:8123/hassio/dashboard'
  276.  
  277. automation:
  278.   - id: '1585256741683'
  279.     alias: Check config with update
  280.     description: Starts the check config addon when an update becomes available
  281.     trigger:
  282.     - entity_id: sensor.updater_core
  283.       platform: state
  284.       to: 'on'
  285.     condition: []
  286.     action:
  287.     - data:
  288.         addon: core_check_config
  289.       service: hassio.addon_start
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296. sensor:
  297.  # Sensor to track available updates for supervisor & addons
  298.   - platform: command_line
  299.     name: Supervisor updates
  300.     command: 'curl http://supervisor/supervisor/info -H "Authorization: Bearer $(printenv SUPERVISOR_TOKEN)" | jq ''{"newest_version":.data.version_latest,"current_version":.data.version,"update_available":.data.update_available,"addons":[.data.addons[] | select(.update_available)]}'''
  301.     value_template: "{{ value_json.addons | length }}"
  302.     unit_of_measurement: pending update(s)
  303.     json_attributes:
  304.    - update_available
  305.     - newest_version
  306.     - current_version
  307.     - addons
  308.   # Sensors to track updates to other core components (audio, dns, CLI and multicast)
  309.   - platform: command_line
  310.     name: Updater Audio
  311.     command: 'curl http://supervisor/audio/info -H "Authorization: Bearer $(printenv SUPERVISOR_TOKEN)" | jq ''{"newest_version":.data.version_latest,"current_version":.data.version, "update_available":.data.update_available}'''
  312.     value_template: "{% if value_json.update_available %}on{% else %}off{% endif %}"
  313.     json_attributes:
  314.    - update_available
  315.     - newest_version
  316.     - current_version
  317.   - platform: command_line
  318.     name: Updater DNS
  319.     command: 'curl http://supervisor/dns/info -H "Authorization: Bearer $(printenv SUPERVISOR_TOKEN)" | jq ''{"newest_version":.data.version_latest,"current_version":.data.version, "update_available":.data.update_available}'''
  320.     value_template: "{% if value_json.update_available %}on{% else %}off{% endif %}"
  321.     json_attributes:
  322.    - update_available
  323.     - newest_version
  324.     - current_version
  325.   - platform: command_line
  326.     name: Updater CLI
  327.     command: 'curl http://supervisor/cli/info -H "Authorization: Bearer $(printenv SUPERVISOR_TOKEN)" | jq ''{"newest_version":.data.version_latest,"current_version":.data.version, "update_available":.data.update_available}'''
  328.     value_template: "{% if value_json.update_available %}on{% else %}off{% endif %}"
  329.     json_attributes:
  330.    - update_available
  331.     - newest_version
  332.     - current_version
  333.   - platform: command_line
  334.     name: Updater Multicast
  335.     command: 'curl http://supervisor/multicast/info -H "Authorization: Bearer $(printenv SUPERVISOR_TOKEN)" | jq ''{"newest_version":.data.version_latest,"current_version":.data.version, "update_available":.data.update_available}'''
  336.     value_template: "{% if value_json.update_available %}on{% else %}off{% endif %}"
  337.     json_attributes:
  338.    - update_available
  339.     - newest_version
  340.     - current_version
  341.   - platform: command_line
  342.     name: Updater Observer
  343.     command: 'curl http://supervisor/observer/info -H "Authorization: Bearer $(printenv SUPERVISOR_TOKEN)" | jq ''{"newest_version":.data.version_latest,"current_version":.data.version, "update_available":.data.update_available}'''
  344.     value_template: "{% if value_json.update_available %}on{% else %}off{% endif %}"
  345.     json_attributes:
  346.    - update_available
  347.     - newest_version
  348.     - current_version
  349.   # Alternate updater sensor for core since binary_sensor.updater is very slow to recognize updates
  350.   - platform: command_line
  351.     name: Updater Core
  352.     command: 'curl http://supervisor/core/info -H "Authorization: Bearer $(printenv SUPERVISOR_TOKEN)" | jq ''{"newest_version":.data.version_latest,"current_version":.data.version, "update_available":.data.update_available}'''
  353.     value_template: "{% if value_json.update_available %}on{% else %}off{% endif %}"
  354.     json_attributes:
  355.    - update_available
  356.     - newest_version
  357.     - current_version  
  358.   # Hass OS version
  359.   - platform: command_line
  360.     name: Hassos updates
  361.     command: >
  362.       curl http://supervisor/os/info -H "Authorization: Bearer $(printenv SUPERVISOR_TOKEN)" | jq '{"newest_version":.data.version_latest,"current_version":.data.version}'
  363.    value_template: >
  364.      {% if value_json.newest_version != value_json.current_version %}on
  365.      {% else %}off
  366.      {% endif %}
  367.    json_attributes:
  368.      - newest_version
  369.      - current_version
  370.  
  371. binary_sensor:
  372.  # True if there's updates available for any HACS components, Addons or the Host
  373.  - platform: threshold
  374.    name: Updater HACS
  375.    entity_id: sensor.hacs
  376.    upper: 0.5
  377.  - platform: threshold
  378.    name: Updater Addons
  379.    entity_id: sensor.supervisor_updates
  380.    upper: 0.5
  381.  - platform: threshold
  382.    name: Updater Host
  383.    entity_id: sensor.host_updates
  384.    upper: 0.5
  385.  
  386.  - platform: template
  387.    sensors:
  388.      # True if there's an update available for supervisor
  389.      updater_supervisor:
  390.        friendly_name: 'Updater Supervisor'
  391.        device_class: problem
  392.        value_template: "{{ state_attr('sensor.supervisor_updates', 'update_available') }}"
  393.        availability_template: "{{ states('sensor.supervisor_updates') | int(-1) > -1 }}"
  394.  
  395. alert:
  396.  # Update is available - un-acknowledgeble, auto-dismiss, me only
  397.  # Wait 5 minutes before first to give core config check time to run
  398.  ha_update_available:
  399.    name: HA has an update
  400.    entity_id: sensor.updater_core
  401.    state: 'on'
  402.    can_acknowledge: false
  403.    repeat:
  404.    - 5
  405.    - 360
  406.    skip_first: true
  407.    title: 'Update for HA available'
  408.    message: "New version is {{ state_attr('sensor.updater_core', 'newest_version') }}. Currently on {{ state_attr('sensor.updater_core', 'current_version') }}"
  409.    notifiers:
  410.       - dageraad
  411.    data:
  412.      tag: 'ha-update-available'
  413.      url: 'http://hassio.lan:8123/hassio/addon/core_check_config'
  414.  
  415.  # Supervisor update is available - un-acknowledgeable, auto-dismiss, me only
  416.  supervisor_update_available:
  417.    name: Supervisor has an update
  418.    entity_id: binary_sensor.updater_supervisor
  419.    state: 'on'
  420.    can_acknowledge: false
  421.    repeat: 360
  422.    title: 'Update for HA Supervisor available'
  423.    message: "New version is {{ state_attr('sensor.supervisor_updates', 'newest_version') }}. Currently on {{ state_attr('sensor.supervisor_updates', 'current_version') }}"
  424.    notifiers:
  425.      - dageraad
  426.    data:
  427.      tag: 'supervisor-update-available'
  428.      url: 'http://hassio.lan:8123/hassio/dashboard'
  429.  
  430.  # Audio update is available - un-acknowledgeable, auto-dismiss, me only
  431.  audio_update_available:
  432.    name: Audio has an update
  433.    entity_id: sensor.updater_audio
  434.    state: 'on'
  435.    can_acknowledge: false
  436.    repeat: 360
  437.    title: 'Update for HA Audio available'
  438.    message: "New version is {{ state_attr('sensor.updater_audio', 'newest_version') }}. Currently on {{ state_attr('sensor.updater_audio', 'current_version') }}"
  439.    notifiers:
  440.       - dageraad
  441.    data:
  442.      tag: 'audio_update_available'
  443.      url: 'http://hassio.lan:8123/hassio/dashboard'
  444.  
  445.  # DNS update is available - un-acknowledgeable, auto-dismiss, me only
  446.  dns_update_available:
  447.    name: DNS has an update
  448.    entity_id: sensor.updater_dns
  449.    state: 'on'
  450.    can_acknowledge: false
  451.    repeat: 360
  452.    title: 'Update for HA DNS available'
  453.    message: "New version is {{ state_attr('sensor.updater_dns', 'newest_version') }}. Currently on {{ state_attr('sensor.updater_dns', 'current_version') }}"
  454.    notifiers:
  455.       - dageraad
  456.    data:
  457.      tag: 'dns_update_available'
  458.      url: 'http://hassio.lan:8123/hassio/dashboard'
  459.  
  460.  # CLI update is available - un-acknowledgeable, auto-dismiss, me only
  461.  cli_update_available:
  462.    name: CLI has an update
  463.    entity_id: sensor.updater_cli
  464.    state: 'on'
  465.    can_acknowledge: false
  466.    repeat: 360
  467.    title: 'Update for HA CLI available'
  468.    message: "New version is {{ state_attr('sensor.updater_cli', 'newest_version') }}. Currently on {{ state_attr('sensor.updater_cli', 'current_version') }}"
  469.    notifiers:
  470.      - dageraad
  471.    data:
  472.      tag: 'cli_update_available'
  473.      url: 'http://hassio.lan:8123/hassio/dashboard'
  474.  
  475.  # Multicast update is available - un-acknowledgeable, auto-dismiss, me only
  476.  multicast_update_available:
  477.    name: Multicast has an update
  478.    entity_id: sensor.updater_multicast
  479.    state: 'on'
  480.    can_acknowledge: false
  481.    repeat: 360
  482.    title: 'Update for HA Multicast available'
  483.    message: "New version is {{ state_attr('sensor.updater_multicast', 'newest_version') }}. Currently on {{ state_attr('sensor.updater_multicast', 'current_version') }}"
  484.    notifiers:
  485.       - dageraad
  486.    data:
  487.      tag: 'multicast_update_available'
  488.      url: 'http://hassio.lan:8123/hassio/dashboard'
  489.  
  490.  # Observer update is available - un-acknowledgeable, auto-dismiss, mike only
  491.  observer_update_available:
  492.    name: Observer has an update
  493.    entity_id: sensor.updater_observer
  494.    state: 'on'
  495.    can_acknowledge: false
  496.    repeat: 360
  497.    title: 'Update for HA Observer available'
  498.    message: "New version is {{ state_attr('sensor.updater_observer', 'newest_version') }}. Currently on {{ state_attr('sensor.updater_observer', 'current_version') }}"
  499.    notifiers:
  500.    - dageraad
  501.    data:
  502.      tag: 'observer_update_available'
  503.      url: 'http://hassio.lan:8123/hassio/dashboard'
  504.  
  505.  # HACS repos have updates available - unacknowledgeable, auto-dismiss, me only
  506.  hacs_update_available:
  507.    name: HACS repos have updates
  508.    entity_id: binary_sensor.updater_hacs
  509.    state: 'on'
  510.    can_acknowledge: false
  511.    repeat: 360
  512.    message: "Updates available in {{ states('sensor.hacs') }} HACS repo{% if states('sensor.hacs') | int > 1 %}s{% endif %}"
  513.     title: "HACS"
  514.     notifiers:
  515.      - dageraad
  516.     data:
  517.        tag: 'hacs-update-available'
  518.        url: 'http://hassio.lan:8123/hacs/installed'
  519.  
  520.   # Addons have updates available - unacknowledgeable, auto-dismiss, me only
  521.   addon_update_available:
  522.     name: Addons have updates
  523.     entity_id: binary_sensor.updater_addons
  524.     state: 'on'
  525.     can_acknowledge: false
  526.     repeat: 360
  527.     message : "Updates available for {{ states('sensor.supervisor_updates') }} HA addon{% if states('sensor.supervisor_updates') | int > 1 %}s{% endif %}"
  528.     title: "Addons"
  529.     notifiers:
  530.       - dageraad
  531.     data:
  532.       tag: 'addon-update-available'
  533.       url: 'http://hassio.lan:8123/hassio/dashboard'
  534.  
  535. automation:
  536.   - id: '1585256741683'
  537.     alias: Check config with update
  538.     description: Starts the check config addon when an update becomes available
  539.     trigger:
  540.     - entity_id: sensor.updater_core
  541.       platform: state
  542.       to: 'on'
  543.     condition: []
  544.     action:
  545.     - data:
  546.         addon: core_check_config
  547.       service: hassio.addon_start
  548.  
  549.  
  550.  
  551.  
  552.  
  553.  
  554.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement