code: def async_update(self, event, reason={}):
          
          reason['attr'] = []
          for data in ['state', 'config']:
              changed_attr = self.update_attr(event.get(data, {}))
              reason[data] = data in event
              reason['attr'] += changed_attr
          super().async_update(event, reason)
docs: New event for sensor.
  
          Check if state or config is part of event.
          Signal that sensor has updated attributes.
          Inform what attributes got changed values.