* netatmo: make module type identification more consistent
For the interpretation of voltage values the different types of netatmo
modules need to be distinguished. This is currently done by selecting
the second character of the modules '_id'. The _id-field actually
contains a mac address. This is an undocumented way of identifying the
module_type.
The netatmo API also delivers a field called 'type' which provides a
more consistent way to differentiate the fields. This commit introduces
a differentiation which uses this provided type. This should improve
readability.
Also the field module_id is renamed to module_type which should better
resemble what it actually represents.
* netatmo: reintroduce unique_id using actual module mac address
Each netatmo module features a unique MAC-Address. The base station uses
an actual assigned MAC Address it also uses on the Wifi it connects to.
All other modules have unique MAC Addresses which are only assigned and
used by Netatmo on the internal Wireless-Network. All theses Addresses
are exposed via the API. So we could use the combination
MAC-Address-Sensor_type as unique_id.
In a previous commit this had already been tried but there was a
misunderstanding in what the 'module_id' represented. It was actually
only a module_type representation so it clashed when two modules of the
same type where used.
* Netatmo: fixed line length
* added additional filters
Added base64_encode, base64_decode and ordinal filters.
* added test cases
added test cases for base64_encode, base64_decode and ordinal filters.
* forgot to add filters :)
* Create test for platform
Created test for platform.
Added media_stop to common.py test
* Multiple improvements
Fixed lint issue in common.py
Fixed lint issues in test_directv.py
Improved patching import using modile_patcher.start() and stop()
Added asserts for service calls.
* Updates based on Martin's review
Updates based on Martin's review.
* Updated test based on PR#18474
Updated test to use service play_media instead of select_source based on change from PR18474
* Lint issues
Lint issues
* Further updates based on feedback
Updates based on feedback provided.
* Using async_load_platform for discovery test
Using async_load_platform for discovery tests.
Added asserts to ensure entities are created with correct names.
* Used HASS event_loop to setup component
Use HASS event_loop to setup the component async.
* Updated to use state machine for # entities
Updated to use state machine to count # entities instead of entities.
* Use hass.loop instead of getting current loop
Small update to use hass.loop instead, thanks Martin!
* Forgot to remove asyncio
Removed asyncio import.
* Added fixtures
Added fixtures.
* Remove not needed updates and assertions
* Return mocked dtv instance from side_effect
* Fix return correct fixture instance
* Clean up assertions
* Fix remaining patches
* Mock time when setting up component in fixture
* Patch time correctly
* Attribute _last_update should return utcnow
* Added Entur departure information sensor.
* Fixed houndci-bot comments.
* Removed tailing whitespace.
* Fixed some comments from tox lint.
* Improved docstring, i think.
* Fix for C1801
* Unit test for entur platform setup
* Rewritten entur component to have pypi dependecy.
* Propper client id for api usage.
* Minor cleanup of usage of constants.
* Made location output configurable.
* Cleaned up usage of constants.
* Moved logic to be contained within setup or update methods.
* Moved icon consts to root in module.
* Using config directly in test
* Minor changes
* Store state last seen time separately
This ensures that infrequently updated entities aren't accidentally
dropped from the restore states store
* Fix mock restore cache
* Quickfix for crash with virtual devices
Added try/except to critical loops of processing
Reinforced read_devices, map_device_to_type and update processing
* oops
* BUGFIX: add support for extra fan speeds.
* Drop extra fan speeds.
Remove catch all, drop missing fan speeds.
* fix self.speed_synonyms call. Remove un-needed keys() call
* Add support for Mode trait in Google Assistant.
* Simplify supported logic.
* Fix SUPPORTED_MODE_SETTINGS to correct rip failures.
* more stray commas
* update tests.
Add the following sensors that provide interesting data when using a variable speed geothermal system:
* Compressor Power
* Fan Power
* Aux Power
* Loop Pump Power
* Compressor Speed
* Fan Speed
* Fix statistics for binary sensor
-) Binary sensors have 'on' and 'off' for state resulting in issue as numbers were expected. Fixed so that it works with non-numeric states as well.
-) Added check to skip unknown states.
-) Updates test so that binary sensor test will use non-numeric values for states.
* Using guard clause and changed debug to error
Changed to use a guard clause for state unknown.
Writing error on value error instead of debug.
* Add docstring