Address review comment from #55833 (#55985)

This commit is contained in:
Erik Montnemery 2021-09-08 22:48:31 +02:00 committed by GitHub
parent 4d2432cffb
commit a1aca20818
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2314,10 +2314,7 @@ class SensorStateTrait(_Trait):
@classmethod
def supported(cls, domain, features, device_class, _):
"""Test if state is supported."""
return (
domain == sensor.DOMAIN
and device_class in SensorStateTrait.sensor_types.keys()
)
return domain == sensor.DOMAIN and device_class in cls.sensor_types
def sync_attributes(self):
"""Return attributes for a sync request."""