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

Code clean up, warnings fix #40

Open
wants to merge 32 commits into
base: dev
Choose a base branch
from
Open

Code clean up, warnings fix #40

wants to merge 32 commits into from

Conversation

gadulowaty
Copy link
Contributor

No description provided.

gadulowaty and others added 30 commits October 9, 2022 18:18
Made changes to fix warning from HA core log file:
"HomeAssistantType was used from extalife, this is a deprecated alias
which will be removed in HA Core 2025.5. Use homeassistant.core.HomeAssistant
instead, please report it to the author of the 'extalife' custom integration"
Some constants for unit of measurements has been marked as deprecated.
This should happen in 2025.1 version.
Fix type declaration for supported features from int to LightEntityFeature
This fix is addressed to resolve issue of warning in Home Assistant
log "Detected blocking call to import_module inside the event loop by
custom integration 'extalife' at ..."
Added github address of extalife integration to report issues
This commit includes many changes:
* removing of unused imports
* grammar correction in comments
* source files reformating (wrapping code to 120 chars, spaces, new lines etc.)
* removing of duplicate const values
* marking unused callback params for valid code analysis
* correction of some imports to match changes in HA core

pyextalife.py:
* added parameter timeout for async_connect for changing default timeout to 10 sec while reconnecting controller
* better handling of raised exception when data sync with Ha occure while in disconnected state and reconnecting
* added identificatiors for some new devices (SLN-2?, RCW-21)
* replaced int values in DEVICE_ARR_*** with idents (in near feature will move to IntEnum type)
This commit includes many changes:
* removing of unused imports
* grammar correction in comments
* source files reformating (wrapping code to 120 chars, spaces, new lines etc.)
* removing of duplicate const values
* marking unused callback params for valid code analysis
* correction of some imports to match changes in HA core

pyextalife.py:
* added parameter timeout for async_connect for changing default timeout to 10 sec while reconnecting controller
* better handling of raised exception when data sync with Ha occure while in disconnected state and reconnecting
* added identificatiors for some new devices (SLN-2?, RCW-21)
* replaced int values in DEVICE_ARR_*** with idents (in near feature will move to IntEnum type)
This commit includes:
* device.py: DeviceFactory variable name error during check for transmiter (was "type" should be "device_type")
* added debugger detection in ExtalifeAPI, required to obfuscate passwords written to log files, when no debbuger is connected
* fix CoreType import in device.py
* fix grammar in pl.json
Changed to use HA async_add_import_executor_job
This fixes warning about async_add_job calls that will be deprecated in version 2025.4 of HomeAssistant.
Also small fix small typos.
Added missing typings in pyextalife.py
Changed Exta Life commands type to ExtaLifeCmd(IntEnum)
Changed response status to APIStatus(StrEnum) - type name will be probably changed in the near feature
… using defined factor for sensor (with type conversion)

* Added type hinting for HomeAssistant Entities
* Added more restrictive constraint for native_value recomputing when using defined factor for sensor (with type conversion)
* Added type hinting for HomeAssistant Entities
Added missing ExtaLifeController entity remove from HA entity registry for extalife platform during unloading integration
This sensor measure wind speed and illuminance.
In initial stage this sensor was km per hour, now it is meter per second.
…single command GET_EFC_CONFIG_DETAILS

This is change, requires EFC firmware version 1.6.0-release. Due to this change python module getmac is no more required, besides in old version there was problem with this method. When HA was in other network segment module getmac reported wrong mac of EFC controller.
Added translation for extra state attributes - still more to be done.
…many more...

Major fixes:
* config_flow for options during first step did not load stored values - always used defaults
* fixed integration reloading from GUI (not all entites were deleted)

Minor fixes:
* more type hints added
* added missing elements in manifest.json (integration_type, iot_class)

Major improvements:
* changed initialization logic of integration, now it is possible to correct invalid credentials during loading
* if EFC-01 is not available during initialization of integration HA will repeat loading later
* added possibility to reconfigure defined controller settings from GUI (no more editing internal HA files)
* added possibility to download and review integration diagnostic data
* removed dependency on external package getmac, now EFC controller MAC is fetched directly from controller during integration initialization
* added new service config_backup, now it is possible to download complete configuration from controller
* added classes for representing ExtaFile communication entities (ExtaLifeRequest, ExtaLifeResponse)
* reworked exception handling in ExtaLifeAPI
* added handling of error codes while communicating with EFC-01
* moved connection watchdog form integration core directly to ExtaLife API
* added new params for events coming from ExtaLifeConn (previously known as TCPAdapter)
* EFC-01 entity now show different states (connected, disconnected)
* added more extra_state_attributes to controller entity in HA

Minor improvements:
* added missing and corrected existing translations in json files
* added icons for services
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants