binary_sensor sensor_class to entity device_class (#5860)
* binary_sensor sensor_class to entity device_class * Linter fixes * Should be it
This commit is contained in:
parent
67957cbfa8
commit
e877d572f5
36 changed files with 242 additions and 199 deletions
|
@ -23,13 +23,3 @@ class TestBinarySensor(unittest.TestCase):
|
|||
new=True):
|
||||
self.assertEqual(STATE_ON,
|
||||
binary_sensor.BinarySensorDevice().state)
|
||||
|
||||
def test_attributes(self):
|
||||
"""Test binary sensor attributes."""
|
||||
sensor = binary_sensor.BinarySensorDevice()
|
||||
self.assertEqual({}, sensor.state_attributes)
|
||||
with mock.patch('homeassistant.components.binary_sensor.'
|
||||
'BinarySensorDevice.sensor_class',
|
||||
new='motion'):
|
||||
self.assertEqual({'sensor_class': 'motion'},
|
||||
sensor.state_attributes)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue