Title and internal descriptions updates for Fritzbox (#49047)

pull/50036/head
Simone Chemelli 2021-05-03 12:52:22 +02:00 committed by GitHub
parent 779f34a8ed
commit 1ad9f1d714
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 20 additions and 19 deletions

View File

@ -1,4 +1,4 @@
"""Support for AVM Fritz!Box smarthome devices."""
"""Support for AVM FRITZ!SmartHome devices."""
from __future__ import annotations
from datetime import timedelta
@ -28,7 +28,7 @@ from .const import CONF_CONNECTIONS, CONF_COORDINATOR, DOMAIN, LOGGER, PLATFORMS
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
"""Set up the AVM Fritz!Box platforms."""
"""Set up the AVM FRITZ!SmartHome platforms."""
fritz = Fritzhome(
host=entry.data[CONF_HOST],
user=entry.data[CONF_USERNAME],
@ -93,7 +93,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
"""Unloading the AVM Fritz!Box platforms."""
"""Unloading the AVM FRITZ!SmartHome platforms."""
fritz = hass.data[DOMAIN][entry.entry_id][CONF_CONNECTIONS]
await hass.async_add_executor_job(fritz.logout)

View File

@ -20,7 +20,7 @@ from .const import CONF_COORDINATOR, DOMAIN as FRITZBOX_DOMAIN
async def async_setup_entry(
hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback
) -> None:
"""Set up the Fritzbox binary sensor from ConfigEntry."""
"""Set up the FRITZ!SmartHome binary sensor from ConfigEntry."""
entities = []
coordinator = hass.data[FRITZBOX_DOMAIN][entry.entry_id][CONF_COORDINATOR]
@ -45,7 +45,7 @@ async def async_setup_entry(
class FritzboxBinarySensor(FritzBoxEntity, BinarySensorEntity):
"""Representation of a binary Fritzbox device."""
"""Representation of a binary FRITZ!SmartHome device."""
@property
def is_on(self):

View File

@ -1,4 +1,4 @@
"""Support for AVM Fritz!Box smarthome thermostate devices."""
"""Support for AVM FRITZ!SmartHome thermostate devices."""
from homeassistant.components.climate import ClimateEntity
from homeassistant.components.climate.const import (
ATTR_HVAC_MODE,
@ -54,7 +54,7 @@ OFF_REPORT_SET_TEMPERATURE = 0.0
async def async_setup_entry(
hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback
) -> None:
"""Set up the Fritzbox smarthome thermostat from ConfigEntry."""
"""Set up the FRITZ!SmartHome thermostat from ConfigEntry."""
entities = []
coordinator = hass.data[FRITZBOX_DOMAIN][entry.entry_id][CONF_COORDINATOR]
@ -79,7 +79,7 @@ async def async_setup_entry(
class FritzboxThermostat(FritzBoxEntity, ClimateEntity):
"""The thermostat class for Fritzbox smarthome thermostates."""
"""The thermostat class for FRITZ!SmartHome thermostates."""
@property
def supported_features(self):
@ -159,6 +159,7 @@ class FritzboxThermostat(FritzBoxEntity, ClimateEntity):
return PRESET_COMFORT
if self.device.target_temperature == self.device.eco_temperature:
return PRESET_ECO
return None
@property
def preset_modes(self):

View File

@ -1,4 +1,4 @@
"""Config flow for AVM Fritz!Box."""
"""Config flow for AVM FRITZ!SmartHome."""
from urllib.parse import urlparse
from pyfritzhome import Fritzhome, LoginError
@ -37,7 +37,7 @@ RESULT_SUCCESS = "success"
class FritzboxConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
"""Handle a AVM Fritz!Box config flow."""
"""Handle a AVM FRITZ!SmartHome config flow."""
VERSION = 1

View File

@ -1,4 +1,4 @@
"""Constants for the AVM Fritz!Box integration."""
"""Constants for the AVM FRITZ!SmartHome integration."""
import logging
ATTR_STATE_BATTERY_LOW = "battery_low"

View File

@ -1,4 +1,4 @@
"""Support for AVM Fritz!Box smarthome temperature sensor only devices."""
"""Support for AVM FRITZ!SmartHome temperature sensor only devices."""
from homeassistant.components.sensor import SensorEntity
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import (
@ -25,7 +25,7 @@ from .const import (
async def async_setup_entry(
hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback
) -> None:
"""Set up the Fritzbox smarthome sensor from ConfigEntry."""
"""Set up the FRITZ!SmartHome sensor from ConfigEntry."""
entities = []
coordinator = hass.data[FRITZBOX_DOMAIN][entry.entry_id][CONF_COORDINATOR]
@ -66,7 +66,7 @@ async def async_setup_entry(
class FritzBoxBatterySensor(FritzBoxEntity, SensorEntity):
"""The entity class for Fritzbox sensors."""
"""The entity class for FRITZ!SmartHome sensors."""
@property
def state(self):
@ -75,7 +75,7 @@ class FritzBoxBatterySensor(FritzBoxEntity, SensorEntity):
class FritzBoxTempSensor(FritzBoxEntity, SensorEntity):
"""The entity class for Fritzbox temperature sensors."""
"""The entity class for FRITZ!SmartHome temperature sensors."""
@property
def state(self):

View File

@ -1,6 +1,6 @@
{
"config": {
"flow_title": "AVM FRITZ!Box: {name}",
"flow_title": "AVM FRITZ!SmartHome: {name}",
"step": {
"user": {
"description": "Enter your AVM FRITZ!Box information.",

View File

@ -1,4 +1,4 @@
"""Support for AVM Fritz!Box smarthome switch devices."""
"""Support for AVM FRITZ!SmartHome switch devices."""
from homeassistant.components.switch import SwitchEntity
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import (
@ -30,7 +30,7 @@ ATTR_TOTAL_CONSUMPTION_UNIT_VALUE = ENERGY_KILO_WATT_HOUR
async def async_setup_entry(
hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback
) -> None:
"""Set up the Fritzbox smarthome switch from ConfigEntry."""
"""Set up the FRITZ!SmartHome switch from ConfigEntry."""
entities = []
coordinator = hass.data[FRITZBOX_DOMAIN][entry.entry_id][CONF_COORDINATOR]
@ -55,7 +55,7 @@ async def async_setup_entry(
class FritzboxSwitch(FritzBoxEntity, SwitchEntity):
"""The switch class for Fritzbox switches."""
"""The switch class for FRITZ!SmartHome switches."""
@property
def available(self):