* Remove devices that no longer exist
* Run Black after merge
* config 2 devices then 1 devices
* clean up device assertions
* More generic device check
* Add request from Honeywell PR
* remove unnecesary test
optimize dont_remove
* remove unnecessary test
* Actually test same id different domain
* Test correct id
* refactor remove test
* Remove .get for non optional keys
* Comprehension for all_device_ids
* Fix DR test, remove `remove`
* fix entities for full test coverage
* remove unused variable assignment
* Additional assertions confirming other domain
* Assertion error
* new method for identifier loop
* device_entries for lists
* ✨ Implement optional API token in config-flow + options
to make the data download from an authenticated path in ESIOS server
As this is an *alternative* access, and current public path works for the PVPC,
no user (current or new) is compelled to obtain a token,
and it can be enabled anytime in options, or doing the setup again
When enabling the token, it is verified (or "invalid_auth" error),
and a 'reauth' flow is implemented, which can change or disable the token if
it starts failing.
The 1st step of config/options flow adds a bool to enable this private access,
- if unchecked (default), entry is set for public access (like before)
- if checked, a 2nd step opens to input the token, with instructions
of how to get one (with a direct link to create a 'request email').
If the token is valid, the entry is set for authenticated access
The 'reauth' flow shows the boolean flag so the user could disable a bad token
by unchecking the boolean flag 'use_api_token'
* ♻️ Remove storage of flag 'use_api_token' in config entry
leaving it only to enable/disable the optional token in the config-flow
* ♻️ Adjust async_update_options
* ✨ Add new price sensors with API token access
New price sensors added:
- Injection price: price of excess energy from self-consumption
- OMIE price: electricity price in the 'open' market
- MAG price: Temporal tax cost for gas compensation
* ✅ Adapt tests to work with multiple sensors
* 🐛 Fix all integration sensors going unavailable
when any sensor lacks data for the current day (usually the 'OMIE price')
* Fix rebase
* Customize icons and display precision for new sensors
* Disable MAG Tax and OMIE price sensors by default
* Move logic to assign sensor unique ids to integration
* Move helper functions to helpers.py
* Fix sensor activation for API download
* Add Valve integration.
This adds the valve integration discussed in https://github.com/home-assistant/architecture/discussions/975
Most of the code is taken from the cover integration but simplified since valves
can't tilt.
There are a couple outstanding errors I'm not sure how to solve and prevents
me from even making this commit without `--no-verify`.
* Apply PR feedback
* Apply more feedback: Intruduce the bare minimum
* Remove file commited by mistake
* Hopefully this fixes tests
* Match cover's typing and mypy settings
* Change some configuration files
* Fix test
* Increase code coverage a little
* Code coverate inproved to 91%
* 95% code coverage
* Coverate up to 97%
* Coverage 98%
* Apply PR feedback
* Even more feedback
* Add line I shouldn't have removed
* Derive closed/open state from current position
* Hopefully last feedback
* Update homeassistant/components/valve/__init__.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/valve/__init__.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Remove unnecesary translation
* Remove unused method arguments
* Complete code coverage
* Update homeassistant/components/valve/__init__.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Simplify tests
* Update homeassistant/components/valve/__init__.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Apply last feedback
* Update tests/components/valve/test_init.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update tests/components/valve/test_init.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update tests/testing_config/custom_components/test/valve.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* More feedback
* Apply suggestion
* And more feedback
* Apply feedback
* Remove commented code
* Reverse logic to unindent
* Update homeassistant/components/valve/__init__.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/valve/__init__.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Implement stop valve for Mock valve
* Fix tests now that I've implemented stop_valve
* Assert it's neither opening nor closing
* Use current position instead
* Avoid scheduling executor when opening or closing
* Fix incorrect bitwise operation
* Simplify toggle
* Remove uneeded partial functions
* Make is_last_toggle_direction_open private
* Remove valve from test custom integration
* Improve test coverage
* Address review comments
* Address review comments
* Address review comments
* Update homeassistant/components/valve/__init__.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update tests
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Erik <erik@montnemery.com>
* Change IR from light to switch
* Remove old entity
* Add test
* Apply suggestions from code review
Co-authored-by: Jan-Philipp Benecke <github@bnck.me>
---------
Co-authored-by: Jan-Philipp Benecke <github@bnck.me>
* Add device state for additional diagnostics
* Add state test and fix existing tests
* Utilize IntEnum and dict for state lookup
* Update aiounifi to v68
* chore(sunweg): minor requested changes
* test(sunweg): use of fixtures
* feat(sunweg): provide bad auth result on expired authentication
* chore(sunweg): bump version
* chore(sunweg): removed reauth
* chore(sunweg): removed features out of scope
* chore(sunweg): fixtures moved to conftest.py
* chore(sunweg): devicetype moved to const
* chore(sunweg): conftest comment
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
---------
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* Allow multiple configs.
* Rename test configs.
* Remove unused property
* Merge branch 'dev' into srp_energy_202307.coordinator
* Use title in device name.
* Use mocked entity platform for lock service tests
* Cleanup old mock class
* Follow up on code review
* Improve mock entity platform
* Use entity_id of passed entity instead of constant
* Add support for Gen3 devices
* Add RPC_GENERATIONS const
* Add gen3 to tests
* More tests
* Add BLOCK_GENERATIONS const
* Use *_GENERATIONS constants from aioshelly
* Adding DataUpdateCoordinator
* Updating and adding test cases
* Optimizing test
* Fix typing
* Prevent speedtest at startup
* Removing typing on Coordinator
* Update homeassistant/components/fastdotcom/coordinator.py
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Putting back typing
* Update homeassistant/components/fastdotcom/__init__.py
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Adding proper StateType typing
* Fix linting
* Stricter typing
* Creating proper test case for coordinator
* Fixing typo
* Patching librbary
* Adding unavailable state test
* Putting back in asserts
* Update tests/components/fastdotcom/test_coordinator.py
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Update tests/components/fastdotcom/test_coordinator.py
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Update tests/components/fastdotcom/test_coordinator.py
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Update tests/components/fastdotcom/test_coordinator.py
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Update tests/components/fastdotcom/test_coordinator.py
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Coordinator workable proposal
* Update tests/components/fastdotcom/test_coordinator.py
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Working test cases
* Update tests/components/fastdotcom/test_coordinator.py
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Update tests/components/fastdotcom/test_coordinator.py
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Update tests/components/fastdotcom/test_coordinator.py
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Update tests/components/fastdotcom/test_coordinator.py
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Fixing tests and context
* Fix the freezer interval to 59 minutes
* Fix test
---------
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Add config flow to Suez water
* fix tests
* Complete coverage
* Change version to 2024.7
* Fix final test
* Add issue when import is successful
* Move hassdata
* Do unique_id
* Remove import issue when entry already exists
* Remove import issue when entry already exists
* Relocate Bluetooth manager to habluetooth library
* Relocate Bluetooth manager to habluetooth library
* Relocate Bluetooth manager to habluetooth library
* fixes
* fix patching time
* fix more tests
* fix more tests
* split
* Bump habluetooth to 0.7.0
changelog: https://github.com/Bluetooth-Devices/habluetooth/compare/v0.6.1...v0.7.0
This is the big change that will move the manager so the HA
PR that will follow this will be a bit larger than the rest of them
since the manager is connected to everything
* fix types
* fix types
* fix types
* fix patch targets
* fix flakey logbook tests (will need another PR)
* mock shutdown
* bump again
* value can be a float now
* Revert "value can be a float now"
This reverts commit b7e7127143.
* float
* Bump openai
* Fix tests
* Apply suggestions from code review
* Undo conftest changes
* Raise repasir issue
* Explicitly use async mock for chat.completions.create
It is not always detected correctly as async because it uses a decorator
* removed duplicated message
* ruff
* Compatibility with old pydantic versions
* Compatibility with old pydantic versions
* More tests
* Apply suggestions from code review
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* Apply suggestions from code review
---------
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* refactor: return date/datetime for due date
* fix: explicitly set due date on vTODO component
Using `set_due` automatically handles converting the Python-native
date/datetime values to the correct representation required by RFC5545.
* fix: fix tests with changed due date handling
* fix: item.due may not be a str
* refactor: keep local timezone of due datetime
* refactor: reorder import statement
To make ruff happy.
* fix: fix false-positive mypy error
* First pass at Tessie
* Working POC
* async_step_reauth
* Config Flow tests
* WIP
* Add test requirement
* correctly gen test requirements
* 100% coverage
* Remove remnants of copy paste
* Add TPMS
* Fix docstring
* Remove redundant line
* Fix some more copied docstrings
* Grammar
* Create reusable StrEnum
* Streamline get
* Add a couple more sensors
* Removed need for a model
* Move MODELS
* Remove DOMAIN from config flow
* Add translation strings
* Remove unused parameter
* Simplify error handling
* Refactor coordinator to class
* Add missing types
* Add icon to shift state
* Simplify setdefault
Co-authored-by: J. Nick Koston <nick@koston.org>
* Use walrus for async_unload_platforms
Co-authored-by: J. Nick Koston <nick@koston.org>
* Reformat entity init
Co-authored-by: J. Nick Koston <nick@koston.org>
* Remove Unique ID
* Better Config Flow Tests
* Fix all remaining tests
* Standardise docstring
* Remove redudnant test
* Set TessieDataUpdateCoordinator on entity
* Correct some sensors
* add error types
* Make shift state a ENUM sensor
* Add more sensors
* Fix translation string
* Add precision suggestions
* Move session from init to coordinator
* Add api_key type
* Remove api_key parameter
* Meta changes
* Update TessieEntity and TessieSensor translations
* Goodbye translation keys
* bump tessie-api to 0.0.9
* Fix only_active to be True
* Per vehicle coordinator
* Rework coordinator
* Fix coverage
* WIP
* The grand rework
* Add comments
* Use ENUM more
* Add ENUM translations
* Update homeassistant/components/tessie/sensor.py
Co-authored-by: J. Nick Koston <nick@koston.org>
* Add entity_category
* Remove reauth
* Remove session
* Update homeassistant/components/tessie/__init__.py
Co-authored-by: J. Nick Koston <nick@koston.org>
* Add property tag
* Add error text
* Complete config flow tests
* Fix property and rename
* Fix init test
* Reworked coordinator tests
* Add extra checks
* Update homeassistant/components/tessie/__init__.py
Co-authored-by: J. Nick Koston <nick@koston.org>
* Update homeassistant/components/tessie/coordinator.py
Co-authored-by: J. Nick Koston <nick@koston.org>
* Apply suggestions from code review
Co-authored-by: J. Nick Koston <nick@koston.org>
* Ruff fix
* Update homeassistant/components/tessie/config_flow.py
Co-authored-by: J. Nick Koston <nick@koston.org>
* Remove future ENUMs
Co-authored-by: J. Nick Koston <nick@koston.org>
* Ruff fix
* Update homeassistant/components/tessie/config_flow.py
Co-authored-by: J. Nick Koston <nick@koston.org>
* Remove reauth and already configured strings
* Lowercase sensor values for translation
* Update homeassistant/components/tessie/__init__.py
Co-authored-by: J. Nick Koston <nick@koston.org>
* Fixed, before using lambda
* Add value lambda
* fix lambda
* Fix config flow test
* @bdraco fix for 500 errors
* format
* Add reauth
* Reuse string in reauth
* Ruff
* remove redundant check
* Improve error tests
---------
Co-authored-by: J. Nick Koston <nick@koston.org>
* Reload zwave_js config entry on device reset
* remove device
* Just remove the device and don't reload
* revert change to notification message
* Assert device is no longer there
* Remove get_rpc_device_sleep_period() function
* Bump aioshelly version to 7.0.0
* Remove firmware compatibility check from BLE scanner
* Remove firmware compatibility check from light transition
* Update default fw ver
* Use LightEntityFeature in tests
* Supports access to squeezebox server behind https reverse proxy
* Update squeezebox test
* Update homeassistant/components/squeezebox/config_flow.py
Co-authored-by: Robert Resch <robert@resch.dev>
* Update homeassistant/components/squeezebox/config_flow.py
Co-authored-by: Robert Resch <robert@resch.dev>
* Update squeezebox unit tests based on code review
* Migration unit test
* Run black on suggestions accepted in code review
* Apply suggestions from code review
Instead of upgrading squeezebox config, just assume a default of https=False.
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Update test_init.py
Remove migrate entry test since we are no longer migrating
* Delete tests/components/squeezebox/test_init.py
Remove unused test
---------
Co-authored-by: Robert Resch <robert@resch.dev>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Replace apcaccess dependency with async version aioapcaccess
* Upgrade the dependency to the latest version (v0.4.2)
* Handle asyncio.IncompleteReadError
* Add OSO Energy integration
* Add min/max for v40 level and bump pyosoenergyapi to 1.0.2
* OSO Energy address review comments
* Bump pyosoenergyapi to 1.0.3 and remove scan interval
* Remove unnecessary code
* Update homeassistant/components/osoenergy/__init__.py
Co-authored-by: Daniel Hjelseth Høyer <mail@dahoiv.net>
* Fixes to latest version
* Add support to set temperature
* Update homeassistant/components/osoenergy/config_flow.py
Co-authored-by: Daniel Hjelseth Høyer <mail@dahoiv.net>
* Fixes after review
* Remove unused code
* Add support for translations and modify services
* Apply suggestions from code review
Co-authored-by: Robert Resch <robert@resch.dev>
* Refactor services and constants according to the PR suggestions
* Remove unnecessary code
* Remove unused import in constants
* Refactoring and support for multiple instances
* Apply suggestions from code review
Co-authored-by: Robert Resch <robert@resch.dev>
* Refactor code and apply review suggestions
* Bump pyosoenergyapi to 1.0.5
* Remove services to reduce initial PR
* Remove extra state attributes and make OSO Entity generic
---------
Co-authored-by: Daniel Hjelseth Høyer <github@dahoiv.net>
Co-authored-by: Daniel Hjelseth Høyer <mail@dahoiv.net>
Co-authored-by: Robert Resch <robert@resch.dev>
* 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
* 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>
* add some basic overrides for z-trm6
* switched id and type
* add fixtures some lints
* duplicate tests of z-trm3
* add broken test for trm6
* fix tests, remove name from fixtures, fix comment
* lints
* forgot lints
* add better description on pwer mode
* Update comment v2
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* fix space from github web merge
* lint on fixture
* fix permissions on fixture
---------
Co-authored-by: geir råness <11741725+geirra@users.noreply.github.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Add Huawei LTE restart and clear traffic statistics buttons
Deprecate corresponding services in favour of these.
* Change to be removed service warnings to issues
* Add tests
* Update planned service remove versions
* Support hybrid local push/pull switches using MQTT
* Update homeassistant/components/fully_kiosk/entity.py
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Fix MQTT subscribe method
---------
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* 🍱 Add new fixture for PVPC data from authenticated API call
and update mocked server responses when data is not available
(now returns a 200 OK with empty data)
* ✨ Implement optional API token in config-flow + options
to make the data download from an authenticated path in ESIOS server
As this is an *alternative* access, and current public path works for the PVPC,
no user (current or new) is compelled to obtain a token,
and it can be enabled anytime in options, or doing the setup again
When enabling the token, it is verified (or "invalid_auth" error),
and a 'reauth' flow is implemented, which can change or disable the token if
it starts failing.
The 1st step of config/options flow adds a bool to enable this private access,
- if unchecked (default), entry is set for public access (like before)
- if checked, a 2nd step opens to input the token, with instructions
of how to get one (with a direct link to create a 'request email').
If the token is valid, the entry is set for authenticated access
The 'reauth' flow shows the boolean flag so the user could disable a bad token
by unchecking the boolean flag 'use_api_token'
* 🌐 Update strings for config/options flows
* ✅ Adapt tests to check API token option and add test_reauth
* 🎨 Link new strings to those in config-flow
* 🐛 tests: Fix mocked date-change with async_fire_time_changed
* ♻️ Remove storage of flag 'use_api_token' in config entry
leaving it only to enable/disable the optional token in the config-flow
* ♻️ Adjust async_update_options
* Update datetime strings to match input_datetime integration
* Add netatmo service to set temperature
* Add netatmo service to clear temperature setting
* Fix formatting
* Add tests for new services
* Fix mypy error
* Fix formatting
* Fix formatting
* Apply suggestions from code review (WIP)
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Complete changes from review suggestions
* Fix build error
* Add service to set temperature for time period
* Expand and fix test
* Replace duplicated strings with links
---------
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* ability to set swing mode on samsung AC
* support for windFree mode on samsung AC
* Apply suggestions from code review
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* suggestion from code reviews
* Apply suggestions from code review
---------
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Refactor to DataUpdateCoordinator
* Fix tests for sunset/sunrise
* Correct time offsets in tests
* Fix time intervals (attempt 2)
* Merge dev
* Fix tests after rebase
* Fix isort
* Address review comments: const and increase cov
* Fix merge problems
* Refactor, removing unnecessary file
* Perform blocking serial IO in the executor
* Replace deprecated async_setup_platforms
* Update based on review comments
* Fix tests
* Update based on review comments.
* Update homeassistant/components/aurora_abb_powerone/sensor.py
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* Use freezer for time deltas.
* Address review comments
---------
Co-authored-by: Dave T <davet2001@users.noreply.github.com>
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* Add tests to Skybell
* better way to manage cache
* uno mas
* try ci fix
* temporary
* undo temporary
* ruff
* black
* uno mas
* uno mas
* remove problematic test for now
* reduce to binary sensor tests
* coverage
* move cache to json
* Update tests/components/skybell/conftest.py
---------
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Add Linear Garage Door integration
* Add Linear Garage Door integration
* Remove light platform
* Add tests for diagnostics
* Changes suggested by Lash
* Minor refactoring
* Various improvements
* Catch up to dev, various fixes
* Fix DeviceInfo import
* Use the HA dt_util
* Update tests/components/linear_garage_door/test_cover.py
* Apply suggestions from code review
---------
Co-authored-by: Robert Resch <robert@resch.dev>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Add RGB, RGBW and RGBWW capability to template.light
Add the required unit test
Mute 'LightTemplate.async_turn_on' is too complex
Rename all HS color mode from a generic "Color" name to a specific "HS" name
* Bring back legacy "color" keyword
* Cleanup unrequested commented test
* Increase code coverage to 100%
* Remove confusing if that should never be false
* Apply suggestions from code review
---------
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Add test sensor.
* Fix sensor test file name.
* Add binary sensor test.
* Fix comments and styling.
* Remove apcupsd from omissions in coveragerc.
* Revert "Remove apcupsd from omissions in coveragerc."
This reverts commit 66b05fcb8829619a771a650a3d70174089e15d91.
* Implement the data coordinator for apcupsd.
* Add tests for sensor updates and throttles.
* Reorder the statement for better code clarity.
* Update docstring.
* Add more tests for checking if the coordinator works ok.
* Implement a custom debouncer with 5 second cooldown for the coordinator.
* Add more tests for checking if our integration is able to properly mark entity's availability.
* Make apcupsd a silver integration.
* Try to fix non-deterministic test behaviors
* Fix JSON format
* Use new `with` format in python 3.10 for better readability
* Update tests.
* Rebase and simplify code.
* Add an ups prefix to the property methods of the coordinator
* Replace init_integration with async_init_integration
* Lint fixes
* Fix imports
* Update BinarySensor implementation to add initial update of attributes
* Fix test failures due to rebases
* Reorder the statements for better code clarity
* Fix incorrect references to the ups_name property
* Simplify BinarySensor value getter code
* No need to update when adding coordinator-controlled sensors
* Adding config flow and tests
* Removing update and adding to integrations.json
* Updating hassfest
* Removing comments
* Removing unique ID
* Putting the setup_platform out of order
* Adding feedback on issues and importing
* Removing uniqueID (again)
* Adjusting unload and typo
* Updating manifest properly
* Minor patching
* Removing hass.data.setdefault(DOMAIN, {})
* Moving load_platform to __init__.py
* Update homeassistant/components/fastdotcom/config_flow.py
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Update homeassistant/components/fastdotcom/strings.json
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Update homeassistant/components/fastdotcom/__init__.py
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Update homeassistant/components/fastdotcom/config_flow.py
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Adding an unload function for the timer
* Adding issue on setup platform in sensor
* Update homeassistant/components/fastdotcom/config_flow.py
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Removing platform
* Fixing strings.json
* Fine-tuning
* Putting back last_state
---------
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Extend `remove_item` service by status
* update services.yaml
* Create own service
* add tests
* Update tests/components/todo/test_init.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* verisure: Support default code from lock entity
* Actually use default lock code
* Typing
* Only pass default code if set
* Avoid passing code as empty string
* Simplified code
* Fix Freebox Home alarm
* Add trigger feature test & fix
* FreeboxCallSensor: Add test for missing coverage of new call
* Use generator
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Add test for arm_home feature (questions about the check)
* Stay focus on alam tests
* can_arm_home ==> if _command_arm_home
* Use one liner for supported_features
* Add idle state
* Fix rebase
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Deprecate weather.get_forecast
* Rename forecast to get_forecasts
* raise issue for use of deprecated service
* Add fix_flow
* Add service translation/yaml
* deprecate calendar.list_events
* rename events to get_events
* raise issue for use of deprecated service
* Make issue fixable
* Add fix_flow
* Add service translation/yaml
* add image to roborock
* add vacuum position
* addressing MR comments
* remove room names as it isn't supported in base package
* 100% coverage
* remove unneeded map changes
* fix image logic
* optimize create_coordinator_maps
* only update time if map is valid
* Update test_image.py
* fix linting from merge conflict
* fix mypy complaints
* re-add vacuum to const
* fix hanging test
* Make map sleep a const
* adjust commenting to be less than 88 characters.
* bump map parser
* Add websocket command to capture audio from a device
* Update homeassistant/components/assist_pipeline/pipeline.py
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
* Add device capture test
* More tests
* Add logbook
* Remove unnecessary check
* Remove seconds and make logbook message past tense
---------
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
* Add reauth support to Schlage
* Enforce same user credentials are used on reauth
* Changes requested during review
* Changes requested during review
* Add password to reauth_confirm data
* Add HassGetWeather intent
* Use async_match_states
* Extend test coverage
* Use get_entity
* Update homeassistant/components/weather/intent.py
* Fix state
---------
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
* Fix netatmo authentication loop
* Update unit tests
* Move logic to determine api scopes
* Add unit tests for new method
* Use pyatmo scope list (#1)
* Exclude scopes not working with cloud
* Fix linting error
---------
Co-authored-by: Tobias Sauerwein <cgtobi@users.noreply.github.com>
* Add ZHA test checking light restores with None attributes
* Move shared `core_rs` fixture to `conftest.py`
* Remove special `color_mode` case, use `parametrize` for expected state
---------
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>