Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
ea7d989
Update pyrainbird to version 0.2.0 to fix zone number issue:
konikvranik Aug 19, 2019
48c8aa2
requirements_all.txt regenerated
konikvranik Aug 19, 2019
fd64293
code formatting
konikvranik Aug 19, 2019
4baffc4
pyrainbird version 0.3.0
konikvranik Sep 1, 2019
46452dd
zone id
konikvranik Sep 1, 2019
486583e
rainsensor return state
konikvranik Sep 1, 2019
9977060
updating rainsensor
konikvranik Sep 1, 2019
e642a96
new version of pyrainbird
konikvranik Sep 3, 2019
8efbce7
binary sensor state
konikvranik Sep 3, 2019
ac2d7bf
quiet in check format
konikvranik Sep 3, 2019
781d056
is_on instead of state for binary_sensor
konikvranik Sep 3, 2019
c8eb58f
no unit of measurement for binary sensor
konikvranik Sep 3, 2019
66fabe1
no monitored conditions config
konikvranik Sep 3, 2019
a3446c2
get keys of dict directly
konikvranik Sep 3, 2019
3eed17b
removed redundant update of state
konikvranik Sep 3, 2019
422d21e
simplified switch
konikvranik Sep 3, 2019
9a2b9c8
right states for switch
konikvranik Sep 3, 2019
50f2846
raindelay sensor
konikvranik Sep 3, 2019
374e648
raindelay sensor
konikvranik Sep 3, 2019
9034b1b
binary sensor state
konikvranik Sep 3, 2019
e88ecd9
binary sensor state
konikvranik Sep 3, 2019
17e65f0
reorganized imports
konikvranik Sep 3, 2019
f7a5ce9
doc on public method
konikvranik Sep 3, 2019
29893d6
reformatted
konikvranik Sep 3, 2019
6851474
Change evohome to asyncio client (#26042)
zxdavb Sep 1, 2019
4dfad33
Upgrade sqlalchemy to 1.3.8 (#26331)
BKPepe Sep 1, 2019
5693fb0
Migrate Axis, deCONZ and UniFi to use config entry subclass (#26173)
Kane610 Sep 1, 2019
a7226bc
Upgrade tibber library (#26332)
Danielhiversen Sep 1, 2019
8df3924
Inverted rflink cover (#26038)
fmartens Sep 1, 2019
7bcb214
UniFi - Simplify getting controller from config entry (#26335)
Kane610 Sep 1, 2019
3edfba1
Add BeeWi SmartClim BLE sensors (#26174)
alemuro Sep 1, 2019
fa164ab
New template sensor attributes (#26127)
gadgetchnnel Sep 1, 2019
d8e097c
Add improvements of device_automation from frontend PR 3514 (#26295)
emontnemery Sep 2, 2019
82676ba
Expose current direction properly on state machine (#26298)
balloob Sep 2, 2019
16604a5
added missing bluepy dependency for miflora (#26297)
ChristianKuehnel Sep 2, 2019
9d84bb3
Update translations
balloob Sep 2, 2019
a9594b1
Updated frontend to 20190901.0
balloob Sep 2, 2019
2b3b124
USGS Earthquakes icon for geolocation entities (#26353)
exxamalte Sep 2, 2019
7c3eaf6
Test with 3.6.1 in Travis (#26347)
scop Sep 2, 2019
1a7000d
Push to version 0.7.10 of denonavr (#26362)
scarface-4711 Sep 2, 2019
2560d4e
Bump androidtv to 0.0.26 and update tests (#26340)
JeffLIrion Sep 2, 2019
75d6ffc
Update google_maps dependency and improve error message (#26361)
costastf Sep 2, 2019
141bfe7
Update zigpy_zigate to 0.2.0 (#26327)
doudz Sep 2, 2019
9cae15c
String has nothing to do with class method naming (#26368)
Kane610 Sep 3, 2019
5213a43
Add token support
pvizeli Sep 3, 2019
67edf3c
Allow passing dictionaries to async_register_entity_service (#26370)
balloob Sep 3, 2019
bb782f7
Upgrade pyhaversion to 3.1.0 (#26232)
fabaff Sep 3, 2019
59c7328
Support new climate arch for zhong_hong (#26309)
crhan Sep 3, 2019
dc47efe
Update azure-pipelines-wheels.yml
pvizeli Sep 3, 2019
7a68d76
Correct file permissions, removing executable bits (#26376)
frenck Sep 3, 2019
29c868e
Fix race during initial Sonos group construction (#26371)
amelchio Sep 3, 2019
e28fc36
Use literal string interpolation in integrations A (f-strings) (#26377)
frenck Sep 3, 2019
9ac869d
Remove solaredge_local duplicate code (#25941)
ThaStealth Sep 3, 2019
a81eb14
Use literal string interpolation in integrations B-D (f-strings) (#26…
frenck Sep 3, 2019
e609530
Use literal string interpolation in integrations E-G (f-strings) (#26…
frenck Sep 3, 2019
5787af1
GeoNet NZ Quakes Sensor (#26078)
exxamalte Sep 3, 2019
2c04a4a
Use literal string interpolation in integrations H-J (f-strings) (#26…
frenck Sep 3, 2019
f48ab8d
Removes executable but from hassfest codeowners (#26381)
frenck Sep 3, 2019
34c66ab
Update translations_upload
pvizeli Sep 3, 2019
025bf5f
Update azure-pipelines-translation.yml for Azure Pipelines
pvizeli Sep 3, 2019
04e58eb
Update azure-pipelines-translation.yml for Azure Pipelines
pvizeli Sep 3, 2019
01dd59e
Update azure-pipelines-release.yml for Azure Pipelines
pvizeli Sep 3, 2019
65cac5d
Update azure-pipelines-translation.yml for Azure Pipelines
pvizeli Sep 3, 2019
599f9ce
Add support Slide cover (#25913)
ualex73 Sep 3, 2019
9e12f94
Use literal string interpolation in integrations N-Q (f-strings) (#26…
frenck Sep 3, 2019
eebd748
Update OpenCV 4.1.1 / Numpy 1.17.1 (#26387)
pvizeli Sep 3, 2019
61550fe
Use literal string interpolation in integrations T-W (f-strings) (#26…
frenck Sep 3, 2019
e16f2c3
Use literal string interpolation in integrations K-M (f-strings) (#26…
frenck Sep 3, 2019
3e1d283
Use literal string interpolation in integrations R-S (f-strings) (#26…
frenck Sep 3, 2019
d13210e
Use literal string interpolation in integrations X-Z (f-strings) (#26…
frenck Sep 3, 2019
ea4f927
add irrigation service to rain bird, which allows you to set the dura…
peternijssen Sep 3, 2019
539d84c
rebased on konikvranik and solved some feedback
peternijssen Sep 5, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ omit =
homeassistant/components/avion/light.py
homeassistant/components/azure_event_hub/*
homeassistant/components/baidu/tts.py
homeassistant/components/beewi_smartclim/sensor.py
homeassistant/components/bbb_gpio/*
homeassistant/components/bbox/device_tracker.py
homeassistant/components/bbox/sensor.py
Expand Down Expand Up @@ -563,6 +564,7 @@ omit =
homeassistant/components/skybeacon/sensor.py
homeassistant/components/skybell/*
homeassistant/components/slack/notify.py
homeassistant/components/slide/*
homeassistant/components/sma/sensor.py
homeassistant/components/smappee/*
homeassistant/components/smarty/*
Expand Down
12 changes: 4 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,14 @@ addons:
matrix:
fast_finish: true
include:
- python: "3.6.0"
- python: "3.6.1"
env: TOXENV=lint
dist: trusty
- python: "3.6.0"
- python: "3.6.1"
env: TOXENV=pylint
dist: trusty
- python: "3.6.0"
- python: "3.6.1"
env: TOXENV=typing
dist: trusty
- python: "3.6.0"
- python: "3.6.1"
env: TOXENV=py36
dist: trusty
- python: "3.7"
env: TOXENV=py37

Expand Down
3 changes: 3 additions & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ homeassistant/components/awair/* @danielsjf
homeassistant/components/aws/* @awarecan @robbiet480
homeassistant/components/axis/* @kane610
homeassistant/components/azure_event_hub/* @eavanvalkenburg
homeassistant/components/beewi_smartclim/* @alemuro
homeassistant/components/bitcoin/* @fabaff
homeassistant/components/bizkaibus/* @UgaitzEtxebarria
homeassistant/components/blink/* @fronzbot
Expand Down Expand Up @@ -235,6 +236,7 @@ homeassistant/components/shell_command/* @home-assistant/core
homeassistant/components/shiftr/* @fabaff
homeassistant/components/shodan/* @fabaff
homeassistant/components/simplisafe/* @bachya
homeassistant/components/slide/* @ualex73
homeassistant/components/sma/* @kellerza
homeassistant/components/smarthab/* @outadoc
homeassistant/components/smartthings/* @andrewsayre
Expand Down Expand Up @@ -288,6 +290,7 @@ homeassistant/components/upcloud/* @scop
homeassistant/components/updater/* @home-assistant/core
homeassistant/components/upnp/* @robbiet480
homeassistant/components/uptimerobot/* @ludeeus
homeassistant/components/usgs_earthquakes_feed/* @exxamalte
homeassistant/components/utility_meter/* @dgomes
homeassistant/components/velbus/* @cereal2nd
homeassistant/components/velux/* @Julius2342
Expand Down
4 changes: 2 additions & 2 deletions azure-pipelines-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ stages:
- script: python setup.py sdist bdist_wheel
displayName: 'Build package'
- script: |
export TWINE_USERNAME="$(twineUser)"
export TWINE_PASSWORD="$(twinePassword)"
TWINE_USERNAME="$(twineUser)"
TWINE_PASSWORD="$(twinePassword)"

twine upload dist/* --skip-existing
displayName: 'Upload pypi'
Expand Down
28 changes: 28 additions & 0 deletions azure-pipelines-translation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# https://dev.azure.com/home-assistant

trigger:
batch: true
branches:
include:
- dev
pr: none
variables:
- group: translation


jobs:

- job: 'Upload'
pool:
vmImage: 'ubuntu-latest'
steps:
- task: UsePythonVersion@0
displayName: 'Use Python 3.7'
inputs:
versionSpec: '3.7'
- script: |
export LOKALISE_TOKEN="$(lokaliseToken)"
export AZURE_BRANCH="$(Build.SourceBranchName)"

./script/translations_upload
displayName: 'Upload Translation'
2 changes: 1 addition & 1 deletion azure-pipelines-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- template: templates/azp-job-wheels.yaml@azure
parameters:
builderVersion: '$(versionWheels)'
builderApk: 'build-base;cmake;git;linux-headers;bluez-dev;libffi-dev;openssl-dev;glib-dev;eudev-dev;libxml2-dev;libxslt-dev;libpng-dev;libjpeg-turbo-dev;tiff-dev;autoconf;automake;cups-dev;linux-headers;gmp-dev;mpfr-dev;mpc1-dev;ffmpeg-dev'
builderApk: 'build-base;cmake;git;linux-headers;bluez-dev;libffi-dev;openssl-dev;glib-dev;eudev-dev;libxml2-dev;libxslt-dev;libpng-dev;libjpeg-turbo-dev;tiff-dev;autoconf;automake;cups-dev;gmp-dev;mpfr-dev;mpc1-dev;ffmpeg-dev'
builderPip: 'Cython;numpy'
wheelsRequirement: 'requirements_wheels.txt'
wheelsRequirementDiff: 'requirements_diff.txt'
Expand Down
6 changes: 3 additions & 3 deletions homeassistant/components/adguard/.translations/pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
"single_instance_allowed": "Dozwolona jest tylko jedna konfiguracja AdGuard Home."
},
"error": {
"connection_error": "Po\u0142\u0105czenie nieudane."
"connection_error": "Nie mo\u017cna nawi\u0105za\u0107 po\u0142\u0105czenia."
},
"step": {
"hassio_confirm": {
"description": "Czy chcesz skonfigurowa\u0107 Home Assistant'a, aby po\u0142\u0105czy\u0142 si\u0119 z AdGuard Home przez dodatek Hass.io {addon}?",
"description": "Czy chcesz skonfigurowa\u0107 Home Assistant, aby po\u0142\u0105czy\u0142 si\u0119 z AdGuard Home przez dodatek Hass.io {addon}?",
"title": "AdGuard Home przez dodatek Hass.io"
},
"user": {
Expand All @@ -21,7 +21,7 @@
"username": "Nazwa u\u017cytkownika",
"verify_ssl": "AdGuard Home u\u017cywa odpowiedniego certyfikatu."
},
"description": "Skonfiguruj swoj\u0105 instancj\u0119 AdGuard Home, aby umo\u017cliwi\u0107 monitorowanie i nadz\u00f3r sieci.",
"description": "Skonfiguruj instancj\u0119 AdGuard Home, aby umo\u017cliwi\u0107 monitorowanie i kontrol\u0119.",
"title": "Po\u0142\u0105cz sw\u00f3j AdGuard Home"
}
},
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/adguard/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def __init__(self, adguard):
async def _adguard_update(self) -> None:
"""Update AdGuard Home entity."""
percentage = await self.adguard.stats.blocked_percentage()
self._state = "{:.2f}".format(percentage)
self._state = f"{percentage:.2f}"


class AdGuardHomeReplacedParentalSensor(AdGuardHomeSensor):
Expand Down Expand Up @@ -205,7 +205,7 @@ def __init__(self, adguard):
async def _adguard_update(self) -> None:
"""Update AdGuard Home entity."""
average = await self.adguard.stats.avg_processing_time()
self._state = "{:.2f}".format(average)
self._state = f"{average:.2f}"


class AdGuardHomeRulesCountSensor(AdGuardHomeSensor):
Expand Down
8 changes: 4 additions & 4 deletions homeassistant/components/airvisual/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ def state(self):
@property
def unique_id(self):
"""Return a unique, HASS-friendly identifier for this entity."""
return "{0}_{1}_{2}".format(self._location_id, self._locale, self._type)
return f"{self._location_id}_{self._locale}_{self._type}"

@property
def unit_of_measurement(self):
Expand All @@ -210,7 +210,7 @@ async def async_update(self):
return

if self._type == SENSOR_TYPE_LEVEL:
aqi = data["aqi{0}".format(self._locale)]
aqi = data[f"aqi{self._locale}"]
[level] = [
i
for i in POLLUTANT_LEVEL_MAPPING
Expand All @@ -219,9 +219,9 @@ async def async_update(self):
self._state = level["label"]
self._icon = level["icon"]
elif self._type == SENSOR_TYPE_AQI:
self._state = data["aqi{0}".format(self._locale)]
self._state = data[f"aqi{self._locale}"]
elif self._type == SENSOR_TYPE_POLLUTANT:
symbol = data["main{0}".format(self._locale)]
symbol = data[f"main{self._locale}"]
self._state = POLLUTANT_MAPPING[symbol]["label"]
self._attrs.update(
{
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/aladdin_connect/cover.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def supported_features(self):
@property
def unique_id(self):
"""Return a unique ID."""
return "{}-{}".format(self._device_id, self._number)
return f"{self._device_id}-{self._number}"

@property
def name(self):
Expand Down
10 changes: 5 additions & 5 deletions homeassistant/components/alarmdecoder/alarm_control_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,27 +140,27 @@ def device_state_attributes(self):
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."""
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/alexa/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class AlexaInvalidEndpointError(AlexaError):

def __init__(self, endpoint_id):
"""Initialize invalid endpoint error."""
msg = "The endpoint {} does not exist".format(endpoint_id)
msg = f"The endpoint {endpoint_id} does not exist"
AlexaError.__init__(self, msg)
self.endpoint_id = endpoint_id

Expand Down Expand Up @@ -73,7 +73,7 @@ def __init__(self, hass, temp, min_temp, max_temp):
"maximumValue": {"value": max_temp, "scale": API_TEMP_UNITS[unit]},
}
payload = {"validRange": temp_range}
msg = "The requested temperature {} is out of range".format(temp)
msg = f"The requested temperature {temp} is out of range"

AlexaError.__init__(self, msg, payload)

Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/alexa/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,7 @@ async def async_api_set_thermostat_mode(hass, config, directive, context):
presets = entity.attributes.get(climate.ATTR_PRESET_MODES, [])

if ha_preset not in presets:
msg = "The requested thermostat mode {} is not supported".format(ha_preset)
msg = f"The requested thermostat mode {ha_preset} is not supported"
raise AlexaUnsupportedThermostatModeError(msg)

service = climate.SERVICE_SET_PRESET_MODE
Expand All @@ -754,7 +754,7 @@ async def async_api_set_thermostat_mode(hass, config, directive, context):
operation_list = entity.attributes.get(climate.ATTR_HVAC_MODES)
ha_mode = next((k for k, v in API_THERMOSTAT_MODES.items() if v == mode), None)
if ha_mode not in operation_list:
msg = "The requested thermostat mode {} is not supported".format(mode)
msg = f"The requested thermostat mode {mode} is not supported"
raise AlexaUnsupportedThermostatModeError(msg)

service = climate.SERVICE_SET_HVAC_MODE
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/alexa/intent.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ async def async_handle_message(hass, message):
handler = HANDLERS.get(req_type)

if not handler:
raise UnknownRequest("Received unknown request {}".format(req_type))
raise UnknownRequest(f"Received unknown request {req_type}")

return await handler(hass, message)

Expand Down
6 changes: 3 additions & 3 deletions homeassistant/components/alexa/state_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ async def async_send_changereport_message(
"""
token = await config.async_get_access_token()

headers = {"Authorization": "Bearer {}".format(token)}
headers = {"Authorization": f"Bearer {token}"}

endpoint = alexa_entity.alexa_id()

Expand Down Expand Up @@ -122,7 +122,7 @@ async def async_send_add_or_update_message(hass, config, entity_ids):
"""
token = await config.async_get_access_token()

headers = {"Authorization": "Bearer {}".format(token)}
headers = {"Authorization": f"Bearer {token}"}

endpoints = []

Expand Down Expand Up @@ -152,7 +152,7 @@ async def async_send_delete_message(hass, config, entity_ids):
"""
token = await config.async_get_access_token()

headers = {"Authorization": "Bearer {}".format(token)}
headers = {"Authorization": f"Bearer {token}"}

endpoints = []

Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/alpha_vantage/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def __init__(self, foreign_exchange, config):
if CONF_NAME in config:
self._name = config.get(CONF_NAME)
else:
self._name = "{}/{}".format(self._to_currency, self._from_currency)
self._name = f"{self._to_currency}/{self._from_currency}"
self._unit_of_measurement = self._to_currency
self._icon = ICONS.get(self._from_currency, "USD")
self.values = None
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/ambiclimate/.translations/pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
"abort": {
"access_token": "Nieznany b\u0142\u0105d podczas generowania tokena dost\u0119pu.",
"already_setup": "Konto Ambiclimate jest skonfigurowane.",
"no_config": "Musisz skonfigurowa\u0107 Ambiclimate, zanim b\u0119dziesz m\u00f3g\u0142 si\u0119 z nim uwierzytelni\u0107. [Przeczytaj instrukcj\u0119](https://www.home-assistant.io/components/ambiclimate/)."
"no_config": "Musisz skonfigurowa\u0107 Ambiclimate, zanim b\u0119dziesz m\u00f3g\u0142 si\u0119 w nim uwierzytelni\u0107. [Przeczytaj instrukcj\u0119](https://www.home-assistant.io/components/ambiclimate/)."
},
"create_entry": {
"default": "Pomy\u015blnie uwierzytelniono z Ambiclimate"
},
"error": {
"follow_link": "Prosz\u0119 klikn\u0105\u0107 link i uwierzytelni\u0107 przed naci\u015bni\u0119ciem przycisku Prze\u015blij",
"no_token": "Nie uwierzytelniony z Ambiclimate"
"no_token": "Nieuwierzytelniony z Ambiclimate"
},
"step": {
"auth": {
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/ambiclimate/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def _generate_oauth(self):
return oauth

def _cb_url(self):
return "{}{}".format(self.hass.config.api.base_url, AUTH_CALLBACK_PATH)
return f"{self.hass.config.api.base_url}{AUTH_CALLBACK_PATH}"

async def _get_authorize_url(self):
oauth = self._generate_oauth()
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/ambient_station/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ def device_info(self):
@property
def name(self):
"""Return the name of the sensor."""
return "{0}_{1}".format(self._station_name, self._sensor_name)
return f"{self._station_name}_{self._sensor_name}"

@property
def should_poll(self):
Expand All @@ -502,7 +502,7 @@ def should_poll(self):
@property
def unique_id(self):
"""Return a unique, unchanging string that represents this sensor."""
return "{0}_{1}".format(self._mac_address, self._sensor_type)
return f"{self._mac_address}_{self._sensor_type}"

async def async_added_to_hass(self):
"""Register callbacks."""
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/amcrest/camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ def _goto_preset(self, preset):
self._api.go_to_preset(action="start", preset_point_number=preset)
except AmcrestError as error:
log_update_error(
_LOGGER, "move", self.name, "camera to preset {}".format(preset), error
_LOGGER, "move", self.name, f"camera to preset {preset}", error
)

def _set_color_bw(self, cbw):
Expand All @@ -499,7 +499,7 @@ def _set_color_bw(self, cbw):
self._api.day_night_color = _CBW.index(cbw)
except AmcrestError as error:
log_update_error(
_LOGGER, "set", self.name, "camera color mode to {}".format(cbw), error
_LOGGER, "set", self.name, f"camera color mode to {cbw}", error
)
else:
self._color_bw = cbw
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/amcrest/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

def service_signal(service, ident=None):
"""Encode service and identifier into signal."""
signal = "{}_{}".format(DOMAIN, service)
signal = f"{DOMAIN}_{service}"
if ident:
signal += "_{}".format(ident.replace(".", "_"))
return signal
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/ampio/air_quality.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def name(self):
@property
def unique_id(self):
"""Return unique_name."""
return "ampio_smog_{}".format(self._station_id)
return f"ampio_smog_{self._station_id}"

@property
def particulate_matter_2_5(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def __init__(self, name, host, ipcam, sensor):

self._sensor = sensor
self._mapped_name = KEY_MAP.get(self._sensor, self._sensor)
self._name = "{} {}".format(name, self._mapped_name)
self._name = f"{name} {self._mapped_name}"
self._state = None
self._unit = None

Expand Down
Loading