* Refactor Integration sensor.
* Use local simple function to verify the State is numeric.
* Merge two methods to one.
* Method renaming: _handle_state_change
* Move async_write_ha_state to the caller.
* Add comment on why attr_icon is set to None
* Remove possible None type of State in validation methods.
* Use a dict to map method name to method class.
* Explain derived unit after integration.
* Renaming to _multiply_unit_with_time and elaborate in docstring.
* Set integral unit_of_measurement explicitly to None if source unit_of_measurement is None
* One function for unit of measurement related steps.
* Improve docstring of _multiply_unit_with_time
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Apply f-string suggestions from code review
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Be more clear in comment about removing the sensors icon default.
* Apply suggestions from code review
Co-authored-by: Diogo Gomes <diogogomes@gmail.com>
* Update homeassistant/components/integration/sensor.py
* Update homeassistant/components/integration/sensor.py
* Update homeassistant/components/integration/sensor.py
---------
Co-authored-by: Erik Montnemery <erik@montnemery.com>
Co-authored-by: Diogo Gomes <diogogomes@gmail.com>
* add more timestamp sensors
* more generic definition for future sensors
* add entity descriptor
* use enable property to prevent sensors from getting added
* set legacy attribute flag for first sensor
* remove departure from extra attributes
* remove breaking changes again and keep for next pr
* fix multiline statements
* outsource the multiline ifs into function
---------
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* initial fork
* intial tests
* Initial test coverage
* extra coverage
* complete config flow tests
* fix generated
* Update CODEOWNERS
* Move logic to PyPi library and update to pass config_flow test and pre-commit
* Remove Button, Select and Sensor platform for initial PR
* Update manifest.json
* Change info logs to debug in cover
* Use _abort_if_unique_id_configured instead of custom loop checking existing entries
* Change platforms list to PLATFORMS global
Co-authored-by: Josef Zweck <24647999+zweckj@users.noreply.github.com>
* Remove VERSION from ConfigFlow
Co-authored-by: Josef Zweck <24647999+zweckj@users.noreply.github.com>
* Replace all info logs by debug
* Use instance attributes in ConfigFlow
Co-authored-by: Josef Zweck <24647999+zweckj@users.noreply.github.com>
* Add return type and docstring to init in ConfigFlow
* Add recovery to tests containing errors
* Make NoBluetoothAdapter and NoDevicesFound abort instead of show error
* Change info logs to debug
* Add and change integration type from hub to device
* Use CONF_ADDRESS from homeassistant.const
* Move cover attributes initialization out of constructor
* Change CONF_ADDRESS in tests from const to homeassistant.const
* Remove unused part of tests
* Change 'not motion_device' to 'motion_device is None'
* Change _attr_connection_type to _connection_type
* Add connections to DeviceInfo
* Add model to DeviceInfo and change MotionBlindType values
* Remove identifiers from DeviceInfo
* Move constants from const to library
* Move calibration and running to library, re-add all platforms
* Remove platforms from init
* Remove button platform
* Remove select platform
* Remove sensor platform
* Bump motionblindsble to 0.0.4
* Remove closed, opening and closing attribute default values
Co-authored-by: Josef Zweck <24647999+zweckj@users.noreply.github.com>
* Remove CONFIG_SCHEMA from init
Co-authored-by: Josef Zweck <24647999+zweckj@users.noreply.github.com>
* Remove unused platform attributes and icons
* Re-add _attr_is_closed to GenericBlind to fix error
* Use entry.async_create_background_task for library instead of entry.async_create_task
* Move updating of position on disconnect to library
* Remove type hints, keep for _attr_is_closed
* Use DISPLAY_NAME constant from library for display name
* Add TYPE_CHECKING condition to assert in config_flow
* Re-add CONFIG_SCHEMA to __init__ to pass hassfest
* Change FlowResult type to ConfigFlowResult
* Fix import in tests
* Fix ruff import
* Fix tests by using value of enum
* Use lowercase name of MotionBlindType enum for data schema selector and translation
* Fix using name instead of value for MotionBlindType
* Improve position None handling
Co-authored-by: starkillerOG <starkiller.og@gmail.com>
* Improve tilt None handling
Co-authored-by: starkillerOG <starkiller.og@gmail.com>
* Change BLIND_TO_ENTITY_TYPE name
* Set entity name of cover to None and use DeviceInfo name
* Add base entity
* Move async_update to base entity
* Move unique ID with suffix to base class
* Add entity.py to .coveragerc
* Remove extra state attribute connection type
* Remove separate line hass.data.setdefault(DOMAIN, {})
* Remove use of field for key and translation_key in MotionCoverEntityDescription
* Remove entity translation with extra state_attributes from strings.json
* Use super().__init__(device, entry)
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* Change if block in async_update_running
* Use if blocks in async_update_position
* Add additional scanner check before show_form
* Remove default value of device_class in MotionCoverEntityDescription
* Fix entry.data[CONF_BLIND_TYPE] uppercase
* Fix device info model name
* Bump motionblindsble to 0.0.5
* Fix tests
* Move entity_description to MotionblindsBLEEntity
* Change double roller blind name
* Bump motionblindsble to 0.0.6
* Fix ruff
* Use status_query for async_update
* Bump motionblindsble to 0.0.7
* Change bluetooth local name
* Set kw_only=True for dataclass
* Change name of GenericBlind
* Change scanner_count conditional
* Wrap async_register_callback in entry.async_on_unload
* Bump motionblindsble to 0.0.8
* Use set_create_task_factory and set_call_later_factory
* Update bluetooth.py generated
* Simplify COVER_TYPES dictionary
* Move registering callbacks to async_added_to_hass
* Remove check for ATTR_POSITION and ATTR_TILT_POSITION in kwargs
* Add naming consistency for device and entry
* Use if block instead of ternary for _attr_unique_id
* Improve errors ternary in config_flow
* Use set instead of list for running_type
* Improve errors ternary in config_flow
* Remove init from MotionblindsBLECoverEntity and move debug log to async_added_to_hass
* Update debug log create cover
* Fix ruff
* Use identity check instead of equals
* Use identity check instead of equals
* Change MotionblindsBLECoverEntityDescription name
* Change debug log text
* Remove ATTR_CONNECTION from const
* Add types for variables in async_setup_entry
* Add types for variables in async_setup_entry
* Change PositionBlind class name to PositionCover etc
* Improve docstrings
* Improve docstrings
---------
Co-authored-by: starkillerOG <starkiller.og@gmail.com>
Co-authored-by: Josef Zweck <24647999+zweckj@users.noreply.github.com>
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
This function was only ever used in homekit, and since there is
now an index of devices in the entity registry, homekit no longer
uses it.
I searched github code for all references to async_get_device_class_lookup
and the only think I could find using it were forks of core. It seems
unlikely that any custom components are affected by removing this
function
* Make one single subscribe containing all topics at once
* Update homeassistant/components/axis/hub/entity_loader.py
Co-authored-by: J. Nick Koston <nick@koston.org>
---------
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: Sid <27780930+autinerd@users.noreply.github.com>
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
* Add generic entity platform setup fixture
* rename fixture
* No need for passing hass
* Make function instead of fixture
* Improve typing
* Use Sequence instead
* Migrate flux to use the new helper
* Use list instead
* Use Sequence instead
* Add strings for issues to raise in telegram integration startup
* Allow proxy_params to be passed empty
Allows migration away from proxy_params whilst retaining a configured proxy.
* Raise issues for removing proxy_params config option
* Add types to initialize_bot function
* Add PR link for learn more URL
Update issue message to leave a comment on the PR instead
* Apply suggestions from code review
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* hass should always be first argument
* Update issues strings to give domain and better direction.
* Update breaks_in_ha_version to something saner
* Apply strings.json suggestions from code review
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Add restrictions for listening to event_reported events
* Update homeassistant/core.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>