Upgrade pylint to 2.2.2 (#18750)
* Upgrade to 2.2.0 * simplifiable-if-expression fixes * duplicate-string-formatting-argument fixes * unused-import fixes * Upgrade to 2.2.1 * Remove no longer needed disable * Upgrade to 2.2.2
This commit is contained in:
1 parent
04c7d5c128
commit
1be440a72b
19 files changed
+35
-40
No files matched your search
@@ -92,14 +92,14 @@ class AlarmDecoderBinarySensor(BinarySensorDevice):
|
||||
"""Return the state attributes."""
|
||||
attr = {}
|
||||
if self._rfid and self._rfstate is not None:
|
||||
attr[ATTR_RF_BIT0] = True if self._rfstate & 0x01 else False
|
||||
attr[ATTR_RF_LOW_BAT] = True if self._rfstate & 0x02 else False
|
||||
attr[ATTR_RF_SUPERVISED] = True if self._rfstate & 0x04 else False
|
||||
attr[ATTR_RF_BIT3] = True if self._rfstate & 0x08 else False
|
||||
attr[ATTR_RF_LOOP3] = True if self._rfstate & 0x10 else False
|
||||
attr[ATTR_RF_LOOP2] = True if self._rfstate & 0x20 else False
|
||||
attr[ATTR_RF_LOOP4] = True if self._rfstate & 0x40 else False
|
||||
attr[ATTR_RF_LOOP1] = True if self._rfstate & 0x80 else False
|
||||
attr[ATTR_RF_BIT0] = bool(self._rfstate & 0x01)
|
||||
attr[ATTR_RF_LOW_BAT] = bool(self._rfstate & 0x02)
|
||||
attr[ATTR_RF_SUPERVISED] = bool(self._rfstate & 0x04)
|
||||
attr[ATTR_RF_BIT3] = bool(self._rfstate & 0x08)
|
||||
attr[ATTR_RF_LOOP3] = bool(self._rfstate & 0x10)
|
||||
attr[ATTR_RF_LOOP2] = bool(self._rfstate & 0x20)
|
||||
attr[ATTR_RF_LOOP4] = bool(self._rfstate & 0x40)
|
||||
attr[ATTR_RF_LOOP1] = bool(self._rfstate & 0x80)
|
||||
return attr
|
||||
|
||||
@property
|
||||
|
||||
@@ -61,8 +61,7 @@ class MyStromView(HomeAssistantView):
|
||||
'{}_{}'.format(button_id, button_action))
|
||||
self.add_entities([self.buttons[entity_id]])
|
||||
else:
|
||||
new_state = True if self.buttons[entity_id].state == 'off' \
|
||||
else False
|
||||
new_state = self.buttons[entity_id].state == 'off'
|
||||
self.buttons[entity_id].async_on_update(new_state)
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user