def __str__(self):
        return "%s: %s" % (self.name, self.state)
String representation of Modbus switch.
dataset/ETHPy150Open home-assistant/home-assistant/homeassistant/components/switch/modbus.py/ModbusSwitch.__str__