Use literal string interpolation in integrations A (f-strings) (#26377)
* Use literal string interpolation in integrations A (f-strings) * Black
This commit is contained in:
parent
3534b8a977
commit
ad51615718
37 changed files with 74 additions and 95 deletions
|
@ -140,27 +140,27 @@ class AlarmDecoderAlarmPanel(alarm.AlarmControlPanel):
|
|||
def alarm_disarm(self, code=None):
|
||||
"""Send disarm command."""
|
||||
if code:
|
||||
self.hass.data[DATA_AD].send("{!s}1".format(code))
|
||||
self.hass.data[DATA_AD].send(f"{code!s}1")
|
||||
|
||||
def alarm_arm_away(self, code=None):
|
||||
"""Send arm away command."""
|
||||
if code:
|
||||
self.hass.data[DATA_AD].send("{!s}2".format(code))
|
||||
self.hass.data[DATA_AD].send(f"{code!s}2")
|
||||
|
||||
def alarm_arm_home(self, code=None):
|
||||
"""Send arm home command."""
|
||||
if code:
|
||||
self.hass.data[DATA_AD].send("{!s}3".format(code))
|
||||
self.hass.data[DATA_AD].send(f"{code!s}3")
|
||||
|
||||
def alarm_arm_night(self, code=None):
|
||||
"""Send arm night command."""
|
||||
if code:
|
||||
self.hass.data[DATA_AD].send("{!s}33".format(code))
|
||||
self.hass.data[DATA_AD].send(f"{code!s}33")
|
||||
|
||||
def alarm_toggle_chime(self, code=None):
|
||||
"""Send toggle chime command."""
|
||||
if code:
|
||||
self.hass.data[DATA_AD].send("{!s}9".format(code))
|
||||
self.hass.data[DATA_AD].send(f"{code!s}9")
|
||||
|
||||
def alarm_keypress(self, keypress):
|
||||
"""Send custom keypresses."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue