Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update fork #4

Merged
merged 1,830 commits into from Apr 9, 2021
Merged

Update fork #4

merged 1,830 commits into from Apr 9, 2021

Conversation

RenierM26
Copy link
Owner

Breaking change

Proposed change

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Example entry for configuration.yaml:

# Example configuration.yaml

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • The code has been formatted using Black (black --fast homeassistant tests)
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • Untested files have been added to .coveragerc.

The integration reached or maintains the following Integration Quality Scale:

  • No score or internal
  • 🥈 Silver
  • 🥇 Gold
  • 🏆 Platinum

To help with the load of incoming pull requests:

bdraco and others added 30 commits March 28, 2021 11:57
* Fix template fan default speed count

The default speed count was defaulting to 3 when percentage
was implemented instead of the documented value of 100

* Increase coverage

* remove unreachable code
If we pass a string to ConfigEntryNotReady or raise it from
another exception we now log the string passed or the
string generated by the original exception.

With #47201 this makes it easy for developers to still show
the reason why setup failed without having to worry about log
spam from additional attempts by rasing ConfigEntryNotReady
from the original exception.
config_entries.async_setup will skip ignored and disabled integrations
but bootstrap would still load them in memory even though they would
never be setup.
If volume was muted and media_player.volume_up is fired, VLC would still
show up as muted.

PR extracted from #44776.
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
)

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
* Command template support

* Fix typo in abbreviations

* Update homeassistant/components/mqtt/fan.py

Co-authored-by: Erik Montnemery <erik@montnemery.com>

* Fix initialize templates

Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Bump zwave-js-server-python to 0.23.0 and update integration to support schema changes

* refactor notification evenets a bit

* fix tests and bug fixes

* additional changes due to new PR

* add command class and command name

* use new event names so we can retain event property names

* handle command status being returned from async_set_config_parameter

* bump dependency version

* adjust log message to be consistent

* disable pylint warning

* Update homeassistant/components/zwave_js/services.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* add test for awake node

* switch async_get_registry to async_get

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Allow MQTT entities to be disabled by default

* Tweak
raman325 and others added 28 commits April 8, 2021 16:53
…#48800)

* Check all endpoints for zwave_js.climate fan mode and operating state

* fix test
* raise an exception when event_type exceeds the max length that the recorder supports

* add test

* use max length constant in recorder

* update config entry reloaded service name

* remove exception string function because it's not needed

* increase limit to 64 and revert event name change

* fix test

* assert exception args

* fix test

* add comment about migration
* Add boost off functionality

* Added backwards compatibility

* Update homeassistant/components/hive/services.yaml

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/hive/climate.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
We plan on matching with _airplay which means we need
to able to limit to specific manufacturers to avoid
generating flows for integrations with the wrong
manufacturer
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Test that we do not initialize bad configuration

* Simplify test as we are not calling a service
* Add update error logging

* Move try available to else

* Remove TimeoutError
* Don't get code_context when calling inspect.stack

* Update homeassistant/helpers/config_validation.py
Some systems expose cpu temperatures differently in
psutil. Specifically, running armbian on the Odroid xu4 sbc gives the
following temerature output:

>>> pp.pprint(psutil.sensors_temperatures())
{   'cpu0-thermal':
    [   shwtemp(label='', current=54.0, high=115.0, critical=115.0)],
    'cpu1-thermal':
    [   shwtemp(label='', current=56.0, high=115.0, critical=115.0)],
    'cpu2-thermal':
    [   shwtemp(label='', current=58.0, high=115.0, critical=115.0)],
    'cpu3-thermal':
    [   shwtemp(label='', current=56.0, high=115.0, critical=115.0)],
}

Since the cpu number is embedded inside the name, the current code
can't find it.

To fix this, check both the name and the constructed label for matches
against CPU_SENSOR_PREFIXES, and add the appropriate label
cpu0-thermal in the prefix list.

While this is slightly less efficient that just generating the label
and checking it, it results in easier to understand code.
* Add a fixture for rtsp client and adapt tests to use it

* Better fixtures for RTSP events and signals
AEMET OpenData doesn't clarify if the hourly data timestamp is UTC or not, but
after correctly formatting the town timestamp in ISO format, it is clear that
the timestamp is provided as UTC value.
Therefore, the only values not provided as UTC are the ones related to the
specific daily and hourly forecast values.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* Update Ezviz Component

* Update Ezviz for pylint test

* Update Ezviz component pylint tests

* Update Ezviz component tests

* Update Ezviz Component tests

* Update Ezviz component pylint error

* Fix ezviz component config flow tests

* Update ezviz component

* Update Ezviz component

* Add sensor platforms

* issue with requirements file

* Update binary_sensor to include switches

* Updates to Ezviz sensors

* Removed enum private method.

* Fix switch args

* Update homeassistant/components/ezviz/switch.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* config flow checks login info

* Config_flow now imports ezviz from camera platform

* Update test

* Updated config_flow with unique_id and remove period from logging

* Added two camera services and clarified service descryptions in services.yaml

* Fixed variable name mistake with new service

* Added french integration translation

* Config_flow add camera rtsp credentials as seperate entities, with user step and import step

* rerun hassfest after rebase

* Removed region from legacy config schema, removed logging in camera platform setup that could contain credentials, removed unused constant.

* Regenerate requirements

* Fix tests and add config_flow import config test

* Added addition test to config_flow to test successfull camera entity create.

* Add to tests method to end in create entry, config_flow cleanup, use entry instead of entry.data

* Removed all services, sorted platforms in init file.

* Changed RTSP logging to debug from warning. (Forgot to change this before commit)

* Cleanup typing, change platform order, bump pyezviz version

* Added types to entries, allow creation of main entry if deleted by validating existance of type

* Config_flow doesn't store serial under entry data, camera rtsp read from entry and not stored in hass, removed duplicate abort if unique id from config flow

* Fix test of config_flow

* Update tests/components/ezviz/test_config_flow.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update tests/components/ezviz/test_config_flow.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update tests/components/ezviz/test_config_flow.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Bumped pyezviz api version, added api pyezvizerror exception raised in api (on HTTPError), cleanup unused imports.

* rebase

* cleanup coordinator, bump pyezviz api version, move async_setup_entry to add entry options to camera entries. (order change)

* Added discovery step in config_flow if cameras detected without rtsp config entry

* Reload main integration after addition or completion of camera rtsp config entry

* Add tests for discovery config_flow, added a few other output asserts

* Camera platform call discover flow with hass.async_create_task. Fixes to config_flow for discovery step

* Fix config_flow discovery, add check to legacy yaml camera platform import, move camera private method to camera import step

* Remove not needed check from config_flow import step.

* Cleanup config_flow

* Added config_flow description for discovered camera

* Reordered description in config_flow confim step.

* Added serial to flow_step description for discovered camera, readded camera attributes for rtsp stream url (allows user to check RTSP cred), added local ip and firmware upgade available.

* Bumped pyezviz version and changed region code to region url. (Russia uses a completly different url). PyEzviz adds a Local IP sensor, removed camera entity attributes.

* Add RSTP describe auth check from API to config_flow

* url as vol.in options in Config_flow

* Config_flow changes to discovery step, added exceptions, fixed tests, added rtsp config validate module mock to test disovery confirm step

* Add test for config_flow step user_camera

* Added tests for abort flow

* Extend tests on custom url flow step

* Fix exceptions in config_flow, fix test for discovery import exception test

* Bump pyezviz api version

* Bump api version, added config_flow function to wake hybernating camera before testing credentials, removed "user camera" step from config flow not needed as cameras are discovered.

* Create pyezviz Api instance for config_flow wake hybernating camera, fixed tests and added fixture to mock method

* Added alarm_control_panel with support to arm/disarm all cameras, fixed camera is available attribute (returns 2 if unavailable, 1 if available)

* Skip ignored entities when setup up camera RTSP stream

* Remove alarm_control_panel, add additional config_flow tests

* Cleanup tests, add tests for discovery_step.

* Add test for config_flow rtsp test step1 exceptions

* Removed redundant except from second step in test RTSP method

* All tests to CREATE or ABORT, added step exception for general HTTP error so user can retry in case of trasient network condition

* Ammended tests with output checks for step_id, error, data, create entry method calls.

* bumped ezviz api now rases library exceptions. Config_flow, coordiantor and init raises library exceptions. Updated test sideeffect for library exceptions

* Bump api version, Create mock ezviz cloud account on discovery tests first to allow more complete testing of step.

* Add abort to rtsp verification method if cloud account was deleted and add tests

* Update tests/components/ezviz/__init__.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/ezviz/const.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update tests/components/ezviz/__init__.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/ezviz/camera.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/ezviz/camera.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/ezviz/camera.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/ezviz/camera.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/ezviz/camera.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/ezviz/camera.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Undo config import change to password key for yaml, move hass.data.setdefault to async_setup_entry and remove async_setup

* Fixed tests by removing _patch_async_setup as this was removed from init.

* Update homeassistant/components/ezviz/camera.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/ezviz/camera.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/ezviz/camera.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Changed L67 on camera config to complete suggestion for cleanup

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
@RenierM26 RenierM26 merged commit cfb8931 into RenierM26:dev Apr 9, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Aug 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.