diff --git a/homeassistant/components/binary_sensor/modbus.py b/homeassistant/components/binary_sensor/modbus.py index 54e4cefb230..3a9b57ba6de 100644 --- a/homeassistant/components/binary_sensor/modbus.py +++ b/homeassistant/components/binary_sensor/modbus.py @@ -50,6 +50,10 @@ class ModbusCoilSensor(BinarySensorDevice): self._coil = int(coil) self._value = None + def name(self): + """Return the name of the sensor.""" + return self._name + @property def is_on(self): """Return the state of the sensor."""