def setup_platform(hass, config, add_entities, discovery_info=None):
    add_entities((OnlineStatus(config, apcupsd.DATA),))
Instantiate an OnlineStatus binary sensor entity.
dataset/ETHPy150Open home-assistant/home-assistant/homeassistant/components/binary_sensor/apcupsd.py/setup_platform