Notify Platform Configs No Longer Working

I’m not sure which update broke this and when the configuration changed. I was going through my logs and found platform errors. Ran a config check and realized a few spots in my config are causing issues and those entities no longer update.

Can anyone shed some light on what to do?

Configuration warnings

Platform error 'notify' from integration 'attributes' - No module named 'custom_components.attributes.notify'
Platform error 'notify' from integration 'template' - No module named 'homeassistant.components.template.notify'
Platform error 'notify' from integration 'time_date' - No module named 'homeassistant.components.time_date.notify'
Platform error 'notify' from integration 'template' - No module named 'homeassistant.components.template.notify'
notify:
  - platform: attributes
    friendly_name: "Kiosk Screensaver"
    attribute: isInScreensaver
    entities:
      - sensor.kiosk_device_info

  - platform: rest
    name: Kiosk Device Info
    resource: !secret rest_url_kiosk_device_info
    json_attributes:
    - screenBrightness
    - ScreenOn
    - isInScreensaver
    - isInDaydream
    - isMenuOpen
    value_template: 'OK'
    scan_interval: 10

  - platform: template
    sensors:
      ha_uptime:
        friendly_name: "Home Assistant uptime"
        value_template: >-
          {% set up_time =  as_timestamp(now()) - as_timestamp(states('sensor.ha_uptime_2')) %}

          {% if up_time == 0 %}
            Just restarted...
          {% else %}
            {% set minutes = (up_time // 60) | int %}
            {% set hours = (minutes // 60) %}
            {% set days = (hours // 24) %}
            {% set weeks = (days // 7) %}

            {% set minutes = (minutes % 60) %}
            {% set hours =  (hours % 24) %}
            {% set days = (days % 7) %}

            {% macro phrase(value, name) %}
                      {%- set value = value %}
                      {%- set end = 's' if value > 1 else '' %}
                      {{- '{} {}{}'.format(value, name, end) if value | int > 0 else '' }}
            {%- endmacro %}

            {% set text = [ phrase(weeks, 'week'), phrase(days, 'day'), phrase(hours, 'hr'), phrase(minutes, 'min') ] | select('!=','') | list | join(', ') %}
            {% set last_comma = text.rfind(',') %}
            {% if last_comma != -1 %}
              {% set text = text[:last_comma] + ' and' + text[last_comma + 1:] %}
            {% endif %}

          {{ text }}

          {% endif %}

  - platform: time_date
    display_options:
      - 'time'

  - platform: template
    sensors:
        sump_pump_power_rounded:
          friendly_name: Sump Pump Power
          unit_of_measurement: W
          value_template: "{{ states('sensor.sump_pump_power') | round(0) }}"

it looks like those are all configurations for sensors. They are definitely not in any way related to notify services.

If you replace
notify:
with
sensor:
it will probably fix your errors.

Edit: unless you already have another sensor: block elsewhere in your config. Then you need to join them together.

1 Like

I’m with @mekaneck swap notify for sensor.

The template sensor can also use the newer format:

template:
 - sensor:
     - name: "HA uptime"
       unique_id: xxx
       state: >
         {%...

     - name: "Sump power rounded"
       unique_id: xxx
       device_class: power
       unit_of_measurement: W
       state: "{{ states('sensor.sump_pump_power') | round(0) }}"

Unless they are in separate packages which is OK.

1 Like

Thanks guys. I took a closer look an found a commented out sensor that I redacted of course, but you were spot on. Resolved! I’ll take a look at the new template format