async def METHOD_NAME(device):
    """Do something with the updated device."""
    # print(device.name + ' ' + str(device.resolve_state()) + ' ' + device.unit_of_measurement())
    value = None
    topic = None
    if re.search("^EL-T-O_", device.name):
        metric = str(device.name)[7:]
        value = device.resolve_state()
        if RE_ACTIVE_POWER.search(metric):
            topic = mh_sensor.get_mqtt_sensor_metric(
                MetricType.WATT, "main_power_central", metric
            )
        elif RE_REACTIVE_POWER.search(metric):
            topic = mh_sensor.get_mqtt_sensor_metric(
                MetricType.VAR, "main_power_central", metric
            )
        elif RE_APPARENT_POWER.search(metric):
            topic = mh_sensor.get_mqtt_sensor_metric(
                MetricType.VA, "main_power_central", metric
            )
        elif RE_VOLTAGE.search(metric):
            topic = mh_sensor.get_mqtt_sensor_metric(
                MetricType.VOLTAGE, "main_power_central", metric
            )
        elif RE_CURRENT.search(metric):
            topic = mh_sensor.get_mqtt_sensor_metric(
                MetricType.CURRENT, "main_power_central", metric
            )
        elif RE_METER_READING.search(metric):
            topic = mh_sensor.get_mqtt_sensor_metric(
                MetricType.KWH, "main_power_central", metric
            )
        elif RE_FREQUENCY:
            topic = mh_sensor.get_mqtt_sensor_metric(
                MetricType.CUSTOM, "main_power_central", metric
            )
    else:
        print(
            f"Uncatched metric: {device.name} {device.resolve_state()!s} {device.unit_of_measurement()}"
        )
    if topic and value:
        # This will create a topic like:
        # myhouse/sensor/KWH/main_power_central/MeterReading_ActiveEnergy 103150280
        # myhouse/sensor/WATT/main_power_central/ActivePower_L2 1028.1099853515625
        # myhouse/sensor/VAR/main_power_central/ReactivePower_L3 136.3699951171875
        # myhouse/sensor/VA/main_power_central/ApparentPower_L3 1449.919921875
        # myhouse/sensor/CURRENT/main_power_central/Current_L3 6.239999294281006
        # When storing it to InfluxDB I have a DB named 'myhouse' where all these values will be stored.
        # Then I use the next two fields as metric name (lowercase):  sensor/current
        # break out main_power_central as a tag 'location', and the last field is tagged as the
        # 'sensor': ApparentPower_L3
        # This makes it really easy to graph in for example Grafana.
        # My latest version of the library doesn't send the value after the MQTT Topic, but a JSON structure
        # that also contains time.
        print(f"{topic} {value!s}")
        # ts = int(time.time() * 1000)
        mqttc.publish(topic, value)