Fix Motionblinds brand name consistency (#110222)

This commit is contained in:
Lenn 2024-02-19 00:04:57 +01:00 committed by GitHub
parent 22e62f42e6
commit 3275b28e2a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
15 changed files with 30 additions and 30 deletions

View File

@ -56,7 +56,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
hass.config_entries.async_update_entry(entry, data=data) hass.config_entries.async_update_entry(entry, data=data)
_LOGGER.debug( _LOGGER.debug(
( (
"Motion Blinds interface updated from %s to %s, " "Motionblinds interface updated from %s to %s, "
"this should only occur after a network change" "this should only occur after a network change"
), ),
multicast_interface, multicast_interface,

View File

@ -1,4 +1,4 @@
"""Config flow to configure Motion Blinds using their WLAN API.""" """Config flow to configure Motionblinds using their WLAN API."""
from __future__ import annotations from __future__ import annotations
from typing import Any from typing import Any
@ -62,12 +62,12 @@ class OptionsFlowHandler(config_entries.OptionsFlow):
class MotionBlindsFlowHandler(config_entries.ConfigFlow, domain=DOMAIN): class MotionBlindsFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
"""Handle a Motion Blinds config flow.""" """Handle a Motionblinds config flow."""
VERSION = 1 VERSION = 1
def __init__(self) -> None: def __init__(self) -> None:
"""Initialize the Motion Blinds flow.""" """Initialize the Motionblinds flow."""
self._host: str | None = None self._host: str | None = None
self._ips: list[str] = [] self._ips: list[str] = []
self._config_settings = None self._config_settings = None

View File

@ -1,9 +1,9 @@
"""Constants for the Motion Blinds component.""" """Constants for the Motionblinds component."""
from homeassistant.const import Platform from homeassistant.const import Platform
DOMAIN = "motion_blinds" DOMAIN = "motion_blinds"
MANUFACTURER = "Motion Blinds, Coulisse B.V." MANUFACTURER = "Motionblinds, Coulisse B.V."
DEFAULT_GATEWAY_NAME = "Motion Blinds Gateway" DEFAULT_GATEWAY_NAME = "Motionblinds Gateway"
PLATFORMS = [Platform.COVER, Platform.SENSOR] PLATFORMS = [Platform.COVER, Platform.SENSOR]

View File

@ -1,4 +1,4 @@
"""DataUpdateCoordinator for motion blinds integration.""" """DataUpdateCoordinator for Motionblinds integration."""
import asyncio import asyncio
from datetime import timedelta from datetime import timedelta
import logging import logging

View File

@ -1,4 +1,4 @@
"""Support for Motion Blinds using their WLAN API.""" """Support for Motionblinds using their WLAN API."""
from __future__ import annotations from __future__ import annotations
import logging import logging
@ -86,7 +86,7 @@ async def async_setup_entry(
config_entry: ConfigEntry, config_entry: ConfigEntry,
async_add_entities: AddEntitiesCallback, async_add_entities: AddEntitiesCallback,
) -> None: ) -> None:
"""Set up the Motion Blind from a config entry.""" """Set up the Motionblind from a config entry."""
entities = [] entities = []
motion_gateway = hass.data[DOMAIN][config_entry.entry_id][KEY_GATEWAY] motion_gateway = hass.data[DOMAIN][config_entry.entry_id][KEY_GATEWAY]
coordinator = hass.data[DOMAIN][config_entry.entry_id][KEY_COORDINATOR] coordinator = hass.data[DOMAIN][config_entry.entry_id][KEY_COORDINATOR]
@ -169,7 +169,7 @@ async def async_setup_entry(
class MotionPositionDevice(MotionCoordinatorEntity, CoverEntity): class MotionPositionDevice(MotionCoordinatorEntity, CoverEntity):
"""Representation of a Motion Blind Device.""" """Representation of a Motionblinds Device."""
_attr_name = None _attr_name = None
_restore_tilt = False _restore_tilt = False
@ -306,7 +306,7 @@ class MotionPositionDevice(MotionCoordinatorEntity, CoverEntity):
class MotionTiltDevice(MotionPositionDevice): class MotionTiltDevice(MotionPositionDevice):
"""Representation of a Motion Blind Device.""" """Representation of a Motionblinds Device."""
_restore_tilt = True _restore_tilt = True
@ -352,7 +352,7 @@ class MotionTiltDevice(MotionPositionDevice):
class MotionTiltOnlyDevice(MotionTiltDevice): class MotionTiltOnlyDevice(MotionTiltDevice):
"""Representation of a Motion Blind Device.""" """Representation of a Motionblinds Device."""
_restore_tilt = False _restore_tilt = False

View File

@ -1,4 +1,4 @@
"""Support for Motion Blinds using their WLAN API.""" """Support for Motionblinds using their WLAN API."""
from __future__ import annotations from __future__ import annotations
from motionblinds import DEVICE_TYPES_GATEWAY, DEVICE_TYPES_WIFI, MotionGateway from motionblinds import DEVICE_TYPES_GATEWAY, DEVICE_TYPES_WIFI, MotionGateway
@ -20,7 +20,7 @@ from .gateway import device_name
class MotionCoordinatorEntity(CoordinatorEntity[DataUpdateCoordinatorMotionBlinds]): class MotionCoordinatorEntity(CoordinatorEntity[DataUpdateCoordinatorMotionBlinds]):
"""Representation of a Motion Blind entity.""" """Representation of a Motionblind entity."""
_attr_has_entity_name = True _attr_has_entity_name = True

View File

@ -100,7 +100,7 @@ class ConnectMotionGateway:
interfaces = await self.async_get_interfaces() interfaces = await self.async_get_interfaces()
for interface in interfaces: for interface in interfaces:
_LOGGER.debug( _LOGGER.debug(
"Checking Motion Blinds interface '%s' with host %s", interface, host "Checking Motionblinds interface '%s' with host %s", interface, host
) )
# initialize multicast listener # initialize multicast listener
check_multicast = AsyncMotionMulticast(interface=interface) check_multicast = AsyncMotionMulticast(interface=interface)
@ -126,7 +126,7 @@ class ConnectMotionGateway:
if result: if result:
# successfully received multicast # successfully received multicast
_LOGGER.debug( _LOGGER.debug(
"Success using Motion Blinds interface '%s' with host %s", "Success using Motionblinds interface '%s' with host %s",
interface, interface,
host, host,
) )
@ -134,7 +134,7 @@ class ConnectMotionGateway:
_LOGGER.error( _LOGGER.error(
( (
"Could not find working interface for Motion Blinds host %s, using" "Could not find working interface for Motionblinds host %s, using"
" interface '%s'" " interface '%s'"
), ),
host, host,

View File

@ -1,6 +1,6 @@
{ {
"domain": "motion_blinds", "domain": "motion_blinds",
"name": "Motion Blinds", "name": "Motionblinds",
"codeowners": ["@starkillerOG"], "codeowners": ["@starkillerOG"],
"config_flow": true, "config_flow": true,
"dependencies": ["network"], "dependencies": ["network"],

View File

@ -1,4 +1,4 @@
"""Support for Motion Blinds sensors.""" """Support for Motionblinds sensors."""
from motionblinds import DEVICE_TYPES_WIFI from motionblinds import DEVICE_TYPES_WIFI
from motionblinds.motion_blinds import DEVICE_TYPE_TDBU from motionblinds.motion_blinds import DEVICE_TYPE_TDBU
@ -23,7 +23,7 @@ async def async_setup_entry(
config_entry: ConfigEntry, config_entry: ConfigEntry,
async_add_entities: AddEntitiesCallback, async_add_entities: AddEntitiesCallback,
) -> None: ) -> None:
"""Perform the setup for Motion Blinds.""" """Perform the setup for Motionblinds."""
entities: list[SensorEntity] = [] entities: list[SensorEntity] = []
motion_gateway = hass.data[DOMAIN][config_entry.entry_id][KEY_GATEWAY] motion_gateway = hass.data[DOMAIN][config_entry.entry_id][KEY_GATEWAY]
coordinator = hass.data[DOMAIN][config_entry.entry_id][KEY_COORDINATOR] coordinator = hass.data[DOMAIN][config_entry.entry_id][KEY_COORDINATOR]

View File

@ -1,4 +1,4 @@
# Describes the format for available motion blinds services # Describes the format for available Motionblinds services
set_absolute_position: set_absolute_position:
target: target:

View File

@ -1,6 +1,6 @@
{ {
"domain": "smart_blinds", "domain": "smart_blinds",
"name": "Smart Blinds", "name": "Smartblinds",
"integration_type": "virtual", "integration_type": "virtual",
"supported_by": "motion_blinds" "supported_by": "motion_blinds"
} }

View File

@ -3699,7 +3699,7 @@
"iot_class": "local_push" "iot_class": "local_push"
}, },
"motion_blinds": { "motion_blinds": {
"name": "Motion Blinds", "name": "Motionblinds",
"integration_type": "hub", "integration_type": "hub",
"config_flow": true, "config_flow": true,
"iot_class": "local_push" "iot_class": "local_push"
@ -5408,7 +5408,7 @@
"iot_class": "cloud_polling" "iot_class": "cloud_polling"
}, },
"smart_blinds": { "smart_blinds": {
"name": "Smart Blinds", "name": "Smartblinds",
"integration_type": "virtual", "integration_type": "virtual",
"supported_by": "motion_blinds" "supported_by": "motion_blinds"
}, },

View File

@ -1 +1 @@
"""Tests for the Motion Blinds integration.""" """Tests for the Motionblinds integration."""

View File

@ -1,4 +1,4 @@
"""Test the Motion Blinds config flow.""" """Test the Motionblinds config flow."""
import socket import socket
from unittest.mock import Mock, patch from unittest.mock import Mock, patch
@ -71,7 +71,7 @@ TEST_INTERFACES = [
@pytest.fixture(name="motion_blinds_connect", autouse=True) @pytest.fixture(name="motion_blinds_connect", autouse=True)
def motion_blinds_connect_fixture(mock_get_source_ip): def motion_blinds_connect_fixture(mock_get_source_ip):
"""Mock motion blinds connection and entry setup.""" """Mock Motionblinds connection and entry setup."""
with patch( with patch(
"homeassistant.components.motion_blinds.gateway.MotionGateway.GetDeviceList", "homeassistant.components.motion_blinds.gateway.MotionGateway.GetDeviceList",
return_value=True, return_value=True,
@ -363,7 +363,7 @@ async def test_dhcp_flow(hass: HomeAssistant) -> None:
async def test_dhcp_flow_abort(hass: HomeAssistant) -> None: async def test_dhcp_flow_abort(hass: HomeAssistant) -> None:
"""Test that DHCP discovery aborts if not Motion Blinds.""" """Test that DHCP discovery aborts if not Motionblinds."""
dhcp_data = dhcp.DhcpServiceInfo( dhcp_data = dhcp.DhcpServiceInfo(
ip=TEST_HOST, ip=TEST_HOST,
hostname="MOTION_abcdef", hostname="MOTION_abcdef",

View File

@ -1,4 +1,4 @@
"""Test the Motion Blinds config flow.""" """Test the Motionblinds config flow."""
from unittest.mock import Mock from unittest.mock import Mock
from motionblinds import DEVICE_TYPES_WIFI, BlindType from motionblinds import DEVICE_TYPES_WIFI, BlindType