* 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
* Added scene.delete service
Only for scenes created with scene.create
* Refactor after #95984#96390
* Split scene validation in 2
First, check if entity_id is a scene
Second, check if it's a scene created with `scene.create`
* Address feedback
- Move service to `homeassistant` domain
- Register with `platform.async_register_entity_service`
- Raise validation errors instead of just logging messages
* Revert moving the service to the `homeassistant` domain
* Remove unneeded validation
* Use helpers and fix tests
* Apply suggestions from code review
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Fix linting
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>