* Convert network mode from sensor to select for huawei_lte
This also introduces the select platform to huawei_lte integration.
* Move (networkmode, str) mapping to const
Also, rebase on top of the current dev
* Fix variable naming, initialize name
* Fix wrong key for router access
* Typing fixes
* Adapt to current way of registering subscriptions
* Simplify option management, make translatable
* Make use of custom entity description
* Add icon
* Revert sensor formatting changes, move to another PR
* Improve entity class naming
* Add test
* Make sure entity descriptions define a setter function
---------
Co-authored-by: Teemu Rytilahti <tpr@iki.fi>
* Add calendar entity to Radarr
* address feedback/add tests
* black
* uno mas
* rework to coordinator
* uno mas
* move release atttribute writing
* fix calendar items and attributes
* First draft of Wyoming satellite
* Set up homeassistant in tests
* Move satellite
* Add devices with binary sensor and select
* Add more events
* Add satellite enabled switch
* Fix mistake
* Only set up necessary platforms for satellites
* Lots of fixes
* Add tests
* Use config entry id as satellite id
* Initial satellite test
* Add satellite pipeline test
* More tests
* More satellite tests
* Only support single device per config entry
* Address comments
* Make a copy of platforms
* Support for sensors from custom clusters in Matter
* lint
* no need to write state twice
* Add test for eve energy plug
* Update homeassistant/components/matter/entity.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* adjust comment
* debounce extra poll timer
* use async_call_later helper
* Update homeassistant/components/matter/entity.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* wip extend test
* Update test_sensor.py
* fix state class for sensors
* trigger (fake) event callback on all subscribers
* Update eve-energy-plug.json
* add test for additionally polled value
* adjust delay to 3 seconds
* Adjust subscribe_events to always use kwargs
* Update tests/components/matter/common.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update test_sensor.py
* remove redundant code
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Add Holiday integration
* Localize holiday names
* Changes based on review feedback
* Add tests
* Add device info
* Bump holidays to 0.36
* Default to Home Assistant country setting
* Update homeassistant/components/holiday/calendar.py
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Update homeassistant/components/holiday/calendar.py
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Update homeassistant/components/holiday/config_flow.py
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* black
* Move time
* Stop creating duplicate holiday calendars
* Set default language using python-holiday
* Use common translation
* Set _attr_name to None to fix friendly name
* Fix location
* Update homeassistant/components/holiday/__init__.py
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Update homeassistant/components/holiday/calendar.py
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Update homeassistant/components/holiday/calendar.py
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Update tests/components/holiday/test_init.py
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* cleanup
* Set up the integration and test the state
* Test that configuring more than one instance is rejected
* Set default_language to user's language, fallback to country's default language
* Improve tests
* Update homeassistant/components/holiday/calendar.py
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Cleanup
* Add next year so we don't run out
* Update tests/components/holiday/test_init.py
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Cleanup
* Set default language in `__init__`
* Add strict typing
* Change default language: HA's language `en` is `en_US` in holidays, apart from Canada
* CONF_PROVINCE can be None
* Fix test
* Fix default_language
* Refactor tests
* Province can be None
* Add test for translated title
* Address feedback
* Address feedback
* Change test to use service call
* Address feedback
* Apply suggestions from code review
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Changes based on review feedback
* Update homeassistant/components/holiday/calendar.py
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Update homeassistant/components/holiday/calendar.py
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Add a test if next event is missing
* Rebase
* Set device to service
* Remove not needed translation key
---------
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Adding initial setup
* Update homeassistant/components/melcloud/__init__.py
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Adding ConfigEntryNotReady exception
* Update homeassistant/components/melcloud/__init__.py
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Update homeassistant/components/melcloud/config_flow.py
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Update homeassistant/components/melcloud/__init__.py
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Placing exception handling in setup_entry
* Expanding test cases
---------
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Add color temperature to the color mode fallbacks
* Manually add ATTR_COLOR_TEMP since ATTR_COLOR_TEMP_KELVIN is pre-parsed
* Include the legacy ATTR_COLOR_TEMP attribute in the tests
* Apply suggestions from code review
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Add citation for McCamy's approximation formula
If still existing, also see page 3 of https://www.st.com/resource/en/application_note/an5638-how-correlated-color-temperature-is-calculated-by-vd6283-stmicroelectronics.pdf
* Update homeassistant/util/color.py
---------
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Only get Matter device info if device is an actual Matter device
* Return None if matter device does not exist
* lint
* fix test
* adjust google assistant test
* Make the minimum of samples configurable & raise issue when min_samples > max_samples
* Wording
* Remove issue creation and use a custom schema validator
* Remove issue from strings.json
* Add test for validator and fix error message
* Add Todoist Due date and description fields
* Update entity features with new names
* Make items into walrus
* Update due_datetime field
* Add additional tests for adding new fields to items
* Fix call args in todoist test
* Add tests for config validation function
* Add Google Tasks due date and description
* Revert test timezone
* Update changes after upstream
* Update homeassistant/components/google_tasks/todo.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Add google tasks tests for creating
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Add support for multiple mbus devices in dsmr
A dsmr meter can have 4 mbus devices.
Support them all and also add support for a water meter on the mbus
device.
* Apply suggestions from code review
Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>
* Rewrite old gas sensor to new mbus sensor
* No force updates + fix mbus entity unique_id
* Remove old gas device
* Add additional tests
* Fix remarks from last review + move migrated 5b gas meter to new device_id
* Fix ruff error
* Last fixes
---------
Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>
* Use ServiceValidationError for fan preset_mode
* Use _valid_preset_mode_or_raise to raise
* Move preset_mode validation to entity component
* Fix bond fan and comments
* Fixes baf, fjaraskupan and template
* More integration adjustments
* Add custom components mock and test code
* Make NotValidPresetModeError subclass
* Update homeassistant/components/fan/strings.json
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Keep bond has_action validation
* Move demo test asserts outside context block
* Follow up comment
* Update homeassistant/components/fan/strings.json
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Fix demo tests
* Remove pylint disable
* Remove unreachable code
* Update homeassistant/components/fan/__init__.py
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Use NotValidPresetModeError, Final methods
* Address comments
* Correct docst
* Follow up comments
* Update homeassistant/components/fan/__init__.py
Co-authored-by: Erik Montnemery <erik@montnemery.com>
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Send localization info on script errors
* Use connection exception hander
* Keep HomeAssistantError is unknown_error
* Move specific exception handling
* Add support for PECO smart meter
* Add support for PECO smart meter
* Conform to black
* Fix tests and additional clean-up
* Return init file to original state
* Move to FlowResultType
* Catch up to upstream
* Remove commented code
* isort
* Merge smart meter and outage count into one entry
* Test coverage
* Remove logging exceptions from config flow verification
* Fix comments from @emontnemery
* Revert "Add support for PECO smart meter"
This reverts commit 36ca90856684f328e71bc3778fa7aa52a6bde5ca.
* More fixes
* Add tag name to tag scanned event data
* Make name in event data optional, add test cases for events
* Simplify sanity None check of tag data
Co-authored-by: Robert Resch <robert@resch.dev>
* Apply suggestions from code review
---------
Co-authored-by: Robert Resch <robert@resch.dev>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Add To-do due date and description fields
* Fix due date schema
* Revert devcontainer change
* Split due date and due date time
* Add tests for config validation function
* Add timezone converstion tests
* Add local todo due date/time and description implementation
* Revert configuration
* Revert test changes
* Add comments for the todo item field description
* Rename function _validate_supported_features
* Fix issues in items factory
* Readability improvements
* Apply suggestions from code review
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Rename CONF to ATTR usages
* Simplify local time validator
* Rename TodoListEntityFeature fields for setting extended fields
* Remove duplicate validations
* Update subscribe test
* Fix local_todo tests
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Support HTTPS connections to Huawei LTE devices
Not all devices support HTTPS, so we default to plain HTTP still.
Ones that do are very likely to have certificates that do not pass
hostname verification, and are either self signed or issued by an
untrusted CA. Add option to use unverified HTTPS to make it possible to
connect to these, and when in effect, filter urllib3's related warnings
about insecure connections to the hostname in question.
* Use common config key and strings for certificate verification settings
Even though the wording might be slightly suboptimal here, it's better
to be consistent across the codebase than to finetune on this level.
This also switches the default the other way around: verification is
now disabled by default. This is not a good general default, but for
this particular case setups where the verification would succeed would
be so rare and require considerable local setup that it's very
unlikely to happen in practice.
* Add config flow tests
* Mock logout for better test coverage
* Set up custom requests session only when using unverified https
* Add https config flow test case
* Make better use of verify SSL default
* Repair duplicate devices added to the rainbird integration
* Apply suggestions from code review
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update tests/components/rainbird/test_init.py
* Remove use of config_entry.async_setup
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* optionally decouple `EntityDescription.key` from API response key
this makes it possible to have multiple entities for a single API response field
* Add optional `value_fn` to EntityDescriptions
eg. to be able to map a API response value to a different value (status_code -> message)
* Add inverter `status_message` entity
* Add meter `meter_location_description` entity
* add external battery state
* Make Ohmpilot entity state translateable
* use built-in StrEnum
* test coverage
* remove unnecessary checks
None is handled before