* Dynamically map state class, device class and UoM in ZHA smart energy metering sensor
* Fix some state & device classes and add scaling
* Fix added imperial gallons tests
* Use entity description instead of custom class & add one entity to tests
* Apply code review suggestion
* Scale only when needed
* Revert "Scale only when needed"
This reverts commit a9e0403402.
* Avoid second lookup of entity description
* Change test to not mix sensor types
* add Martin's suggestions
* use password description
* fix for reauth + test
* fix invalid_auth test
* Update homeassistant/components/lamarzocco/config_flow.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Adding initial Epion Air integration logic
* Skipping sensors with missing data
* Patching Epion integration
* Adding additional Epion measurement types
* Cleaning up logging
* Cleaning up code
* Fixing error handling for invalid Epion keys
* Adding tests and improving error handling
* Patching Epion tests
* Cleaning up Epion integration code
* Bumping Epion package and including missing files
* Moving data updates to coordinator and addressing feedback
* Improve exception handling
* Exposing model name and firmware version
* Cleaning up code according to review
* Cleaning up code according to review
* Adding check to prevent duplicate account setup
* Refactoring tests and checking for duplicates
* Cleaning up test code according to review
* Cleaning up test code
* Removing entity name overrides
* Fix code format for tests
* Adding missing newlines in JSON files
* Fixing formatting
* Updating device method to always return a device
* Updating coordinator
* keys may be missing at startup
* Add route sensors and tracker location
* Fix keys and add translation
* Allow a sensor to have no value
* Move attribute to sensor
* Remove state attribute string
* Cache construction of is_admin
This has to be checked for a lot of api calls and the websocket
every time the call is made
* Cache construction of is_admin
This has to be checked for a lot of api calls and the websocket
every time the call is made
* Cache construction of is_admin
This has to be checked for a lot of api calls and the websocket
every time the call is made
* modernize
* coverage
* coverage
* verify caching
* verify caching
* fix type
* fix mocking
* add account sensors
* tidy up same issues as other sensors
* add unit tests for sensors
edit and remove comments
assert state and remove HOP sensor types since they aren't being used
* try and fix tests
* add frozen true
* Update tests/components/electric_kiwi/test_sensor.py
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* return proper native types
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* tidy up attr unique id
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* add entities once and use native values properly
* Improve conftest
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* tidy tests/components/electric_kiwi/test_sensor.py
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* add assert to component_setup
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* add extra parameters to test
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Update tests/components/electric_kiwi/test_sensor.py
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Update tests/components/electric_kiwi/test_sensor.py
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* change coordinator name
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* tidy up sensor translation names
* Apply suggestions from code review
---------
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Fix the fan to support preset modes
* Add more tests and fix some comments
* Don't override inherited member
* Don't check for supported feature as the check is already performed before here
* Do not check for feature on properties
* Update homeassistant/components/smartthings/fan.py
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Fix tests
---------
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Fix missing timeout exception check in powerwall config flow
powerwall recently switched to asyncio, and every place we
check for unreachable we need to check for timeout error.
There was one missed
```
09:08 homeassistant homeassistant[546]: 2024-01-12 10:09:08.899 ERROR (MainThread) [homeassistant.components.powerwall.config_flow] Unexpected exception
Jan 12 20:09:08 homeassistant homeassistant[546]: Traceback (most recent call last):
Jan 12 20:09:08 homeassistant homeassistant[546]: File "/usr/src/homeassistant/homeassistant/components/powerwall/config_flow.py", line 168, in _async_try_connect
Jan 12 20:09:08 homeassistant homeassistant[546]: info = await validate_input(self.hass, user_input)
Jan 12 20:09:08 homeassistant homeassistant[546]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jan 12 20:09:08 homeassistant homeassistant[546]: File "/usr/src/homeassistant/homeassistant/components/powerwall/config_flow.py", line 76, in validate_input
Jan 12 20:09:08 homeassistant homeassistant[546]: site_info, gateway_din = await _login_and_fetch_site_info(
Jan 12 20:09:08 homeassistant homeassistant[546]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jan 12 20:09:08 homeassistant homeassistant[546]: File "/usr/src/homeassistant/homeassistant/components/powerwall/config_flow.py", line 43, in _login_and_fetch_site_info
Jan 12 20:09:08 homeassistant homeassistant[546]: await power_wall.login(password)
Jan 12 20:09:08 homeassistant homeassistant[546]: File "/usr/local/lib/python3.12/site-packages/tesla_powerwall/powerwall.py", line 58, in login
Jan 12 20:09:08 homeassistant homeassistant[546]: return await self.login_as(User.CUSTOMER, password, email, force_sm_off)
Jan 12 20:09:08 homeassistant homeassistant[546]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jan 12 20:09:08 homeassistant homeassistant[546]: File "/usr/local/lib/python3.12/site-packages/tesla_powerwall/powerwall.py", line 49, in login_as
Jan 12 20:09:08 homeassistant homeassistant[546]: response = await self._api.login(user, email, password, force_sm_off)
Jan 12 20:09:08 homeassistant homeassistant[546]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jan 12 20:09:08 homeassistant homeassistant[546]: File "/usr/local/lib/python3.12/site-packages/tesla_powerwall/api.py", line 172, in login
Jan 12 20:09:08 homeassistant homeassistant[546]: return await self.post(
Jan 12 20:09:08 homeassistant homeassistant[546]: ^^^^^^^^^^^^^^^^
Jan 12 20:09:08 homeassistant homeassistant[546]: File "/usr/local/lib/python3.12/site-packages/tesla_powerwall/api.py", line 146, in post
Jan 12 20:09:08 homeassistant homeassistant[546]: response = await self._http_session.post(
Jan 12 20:09:08 homeassistant homeassistant[546]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jan 12 20:09:08 homeassistant homeassistant[546]: File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 601, in _request
Jan 12 20:09:08 homeassistant homeassistant[546]: await resp.start(conn)
Jan 12 20:09:08 homeassistant homeassistant[546]: File "/usr/local/lib/python3.12/site-packages/aiohttp/client_reqrep.py", line 960, in start
Jan 12 20:09:08 homeassistant homeassistant[546]: with self._timer:
Jan 12 20:09:08 homeassistant homeassistant[546]: File "/usr/local/lib/python3.12/site-packages/aiohttp/helpers.py", line 735, in __exit__
Jan 12 20:09:08 homeassistant homeassistant[546]: raise asyncio.TimeoutError from None
Jan 12 20:09:08 homeassistant homeassistant[546]: TimeoutError
```
* cov
* First checkin for myUplink
* Refactored coordinator and sensor state classe
* Updated .coveragerc
* Update test_config_flow
* Fix test_config_flow for myuplink
* Only set state class for temperature sensor
* PR comment updates
* Type strong dict
* use asyncio.timeouts
* PR updates (part 1)
* Updated to myuplink 0.0.9
* Add strict typing
* Fix typing
* Inherit CoordinatorEntity
* Clean up coordinator and sensors
* Use common base entity
* Improve device point sensor
* Exclude entity from coverage
* Set device point entity name if there's no entity description
* Update homeassistant/components/myuplink/sensor.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/myuplink/entity.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/myuplink/entity.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Remvoed firmware + connstate sensors
* Always add device point parameter name
* Removed MyUplinkDeviceSensor
* Removed unused class
* key="celsius",
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Startup mechanic
* Workable service (again)
* Optimized version, for now
* Minor refactoring
* Test cases
* Fixing test case
* Adding startup comment
* State_unknown added
* Update homeassistant/components/fastdotcom/services.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Check if config entries are not found
* Update tests/components/fastdotcom/test_service.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/fastdotcom/services.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/fastdotcom/services.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* switcher: added support for device_key logic included in aioswitcher==3.4.1
* switcher: small fix
* switcher: after lint
* switcher: fix missing device_key in tests
* remove device_key function
* fix missing device_key in tests
* improvements
* wait another second before creating the entry
* move delay to lib
* move library bump to separate PR
* move available back to lock from entity
* Add unique home ID device dispatch
* Adding fixture for new setup
* Minor refactor work
* Add check for unlinked to different homes
* If the interface returns an error
* Proper error handling
* Feedback fixes
* Comments for error in client
* Typo
* Update homeassistant/components/tado/__init__.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/tado/__init__.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update devices fix standard
* Dispatch out of loop
* Update dispatcher
* Clean up
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Prevent toggle from calling stop on covers which do not support it
* Update homeassistant/components/cover/__init__.py
---------
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Reduce overhead to compile statistics
statistics uses LazyState for compatibility with State when pulling
data from the database.
After the previous round of refactoring to modern history, the setters
are never called and can be removed.
* reduce
Almost 99% of items that are put into the recorder queue are
Events. Avoid wrapping them in tasks since we have to unwrap
them right away and its must faster to check for both RecorderTask
and Events since events are the common case.
* Bump google-generativeai to 0.3.1
* Migrate to the new API and default to gemini-pro
* Add max output tokens option
* Add generate_content service
* Add tests
* additional checks
* async read_bytes
* Add tests for all errors
* remove removed locks
* move duplicated code to function
* remove entities by removing device
* add new locks automatically
* add locks from coordinator
* remove other PR stuff
* add pullspring lock to test for coverage
* requested changes
* Add new Rabbit Air integration
* Remove py.typed file
It is not needed and was just accidentally added to the commit.
* Enable strict type checking for rabbitair component
Keeping the code fully type hinted is a good idea.
* Add missing type annotations
* Remove translation file
* Prevent data to be added to hass.data if refresh fails
* Reload the config entry when the options change
* Add missing type parameters for generics
* Avoid using assert in production code
* Move zeroconf to optional dependencies
* Remove unnecessary logging
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
* Remove unused keys from the manifest
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
* Replace property with attr
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
* Allow to return None for power
The type of the is_on property now allows this.
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
* Remove unnecessary method call
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
* Update the python library
The new version properly re-exports names from the package root.
* Remove options flow
Scan interval should not be part of integration configuration. This was
the only option, so the options flow can be fully removed.
* Replace properties with attrs
* Remove multiline ternary operator
* Use NamedTuple for hass.data
* Remove unused logger variable
* Move async_setup_entry up in the file
* Adjust debouncer settings to use request_refresh
* Prevent status updates during the cooldown period
* Move device polling code to the update coordinator
* Fix the problem with the switch jumping back and forth
The UI seems to have a timeout of 2 seconds somewhere, which is just a
little bit less than what we normally need to get an updated state. So
the power switch would jump to its previous state and then immediately
return to the new state.
* Update the python library
The new version fixes errors when multiple requests are executed
simultaneously.
* Fix incorrect check for pending call in debouncer
This caused the polling to stop.
* Fix tests
* Update .coveragerc to exclude new file.
* Remove test for Options Flow.
* Update the existing entry when device access details change
* Add Zeroconf discovery step
* Fix tests
The ZeroconfServiceInfo constructor now requires one more argument.
* Fix typing for CoordinatorEntity
* Fix signature of async_turn_on
* Fix depreciation warnings
* Fix manifest formatting
* Fix warning about debouncer typing
relates to 5ae5ae5392
* Wait for config entry platform forwards
* Apply some of the suggested changes
* Do not put the MAC address in the title. Use a fixed title instead.
* Do not format the MAC to use as a unique ID.
* Do not catch exceptions in _async_update_data().
* Remove unused _entry field in the base entity class.
* Use the standard attribute self._attr_is_on to keep the power state.
* Store the MAC in the config entry data
* Change the order of except clauses
OSError is an ancestor class of TimeoutError, so TimeoutError should be
handled first
* Fix depreciation warnings
* Fix tests
The ZeroconfServiceInfo constructor arguments have changed.
* Fix DeviceInfo import
* Rename the method to make it clearer what it does
* Apply suggestions from code review
* Fix tests
* Change speed/mode logic to use is_on from the base class
* A zero value is more appropriate than None
since None means "unknown", but we actually know that the speed is zero
when the power is off.
---------
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Add Hong Kong Observatory integration
* Move coordinator to a separate file
* Map icons to conditions
* Fix code for review
* Skip name
* Add typings to data_coordinator
* Some small fixes
* Rename coordinator.py
* Add response to python_script
* Reset output to empty dict if not valid dict
* Add tests for python_script response
* Raise Exceptions on service execution
* Add info on exception type
* Raise ServiceValidationError instead of ValueError
* Raise only on return_response=True
* Fix exception logger if no service response
* Create issue if exception is not raised
* Revert "Create issue if exception is not raised"
This reverts commit a61dd8619f.
---------
Co-authored-by: rikroe <rikroe@users.noreply.github.com>
* Add ServiceResponse to rest_command
* Handle json and text responses.
Add Unit tests
* Rest command text output handling.
Prevent issue solved by PR#97777
* Re-raise exceptions as HomeAssistantError to enable 'continue_on_error' in scripts / automations.
* Improve test coverage
* Restructure to improve McCabe Complexity
* Remove LookupError
* Revert exception catching location
* Remove LookupError from exception handling
* Add Rainforest RAVEn integration
* Add Rainforest Automation brand
* Add diagnostics to Rainforest RAVEn integration
* Drop a test assertion for an undefined behavior
* Add DEVICE_NAME test constant
* Catch up with reality
* Use Platform.SENSOR
Co-authored-by: Robert Resch <robert@resch.dev>
* Make rainforest_raven translatable
* Stop setting device_class on unsupported scenarios
* Rename rainforest_raven.data -> rainforest_raven.coordinator
* Make _generate_unique_id more reusable
* Move device synchronization into third party library
* Switch from asyncio_timeout to asyncio.timeout
* Ignore non-electric meters
Co-authored-by: Robert Resch <robert@resch.dev>
* Drop direct dependency on iso4217, bump aioraven
* Use RAVEn-specific exceptions
* Add timeouts to data updates
* Move DeviceInfo generation from Sensor to Coordinator
* Store meter macs as strings
* Convert to using SelectSelector
* Drop test_flow_user_invalid_mac
This test isn't necessary now that SelectSelector is used.
* Implement PR feedback
- Split some long format lines
- Simplify meter mac_id extraction in diagnostics
- Expose unique_id using an attribute instead of a property
- Add a comment about the meters dictionary shallow copy
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Simplify mac address redaction
Co-authored-by: Joakim Sørensen <ludeeus@ludeeus.dev>
* Freeze RAVEnSensorEntityDescription dataclass
Co-authored-by: Erik Montnemery <erik@montnemery.com>
---------
Co-authored-by: Robert Resch <robert@resch.dev>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
Co-authored-by: Joakim Sørensen <ludeeus@ludeeus.dev>
* Add sensor tests to Streamlabs water
* Add sensor tests to Streamlabs water
* Use entity descriptions in streamlabs water
* Use entity descriptions in streamlabs water
* Use entity descriptions in streamlabs water
* Add translations
* Issue warning if glances server version is 2
* Auto detect api version
* Apply suggestions
* Add HA version deprecation
* Apply suggestions from code review
* update config flow tests
* Fix breaks in ha version
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
In the case where the user gets their first ESPHome device such as a RATGDO,
they will usually add the device first in HA, and than find the dashboard.
The install function will be missing because we do not know if the dashboard
supports updating devices until the first device is added. We now set the
supported features when we learn the version when the first device is added
* Fix ESPHome service removal when the device name contains a dash
If the device name contains a dash the service name is mutated to
replace the dash with an underscore, but the remove function did
not do the same mutation so it would fail to remove the service
* add more coverage
* more cover
* Changed setup of energyzero services
* PR review updates
* Dict access instead of get
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Added tests for unloaded state
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* media_extractor comp -> add support for cookie file
* Update __init__.py
* Update __init__.py
* fixed pr request, added test
* update test with valid cookie file
* move cookies to subdirectory
* use pathlib instead of os.path
* Use device name to lookup camera
* Fix device registry serial
* Move to entity based services
* Update tests
* Use config_entry
Move refresh service out of camera
* Use config entry for services
* Fix service schema
* Add depreciation note
* Depreciation note
* key error changes
deprecated (not depreciated)
repair issue
* tweak message
* deprication v2
* back out update field change
* backout update schema changes
* Finish rollback on update service
* update doc strings
* move to 2024.7.0
More verbosity to deprecation message
* Add a switch to enable and disable "Color Night Vision" for the Unifi Protect platform, which is a feature on the new G5 Pro cameras with a "Vision Enhancer" attached
* Updated tests for the new switch
* Add query type validation independent of declaration position
* Restore close sess
* Separates invalid query and non-read-only query tests
* Add more tests
* Use the SQLParseError exception for queries that are not read-only
* Add handling for multiple SQL queries.
* Fix test
* Clean ';' at the beginning of the SQL query
* Clean ';' at the beginning of the SQL query - init
* Query cleaning before storing
* Query cleaning before setup sesensor plataform - YAML
* Exception when the SQL query type is not detected
* Cleaning
* Cleaning
* Fix typing in tests
* Fix typing in tests
* Add test for query = ';;'
* Update homeassistant/components/sql/__init__.py
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Update homeassistant/components/sql/__init__.py
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Update __init__.py
* Update config_flow.py
* Clean query before storing
---------
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* initial
* fix tests
* match on specific name and quirk name
* fix tests
* fix tests
* store cluster handlers in only one place
* edit tests
* use correct device for quirk id
* change quirk id
* fix tests
* even if there is a quirk id, it doesn't have to have a specific cluster handler
* add tests
* rename quirk_id
* add tests
* fix tests
* fix tests
* use quirk id from zha_quirks
* Don't update entities until they are initialized
* fix hass reference
* only establish polling once
* fix log level and small cleanup
* start device availability checks after full initialization of network
* add logging
* clean up sensor polling and class hierarchy
* don't attempt restore sensor cleanup in this PR
* put check back
* fix race condition and remove parallel updates
* add sensor polling test
* cleanup switch polling and add a test
* clean up and actually fix race condition
* update light forced refresh
* only use flag
* unused flag
* reduce diff size
* collapse
Original design relied on aioairq.AirQ.__init__ checking if the input
was a valid IP address or an mDNS of a very specific structure,
and raising an InvalidInput otherwise.
Now, aioairq==0.3.2 removes said check completely following a user's
request to allow arbitrary host name and DNS entries.
In the config flow, "cannot_connect" covers the cases of misspelled
inputs now, which previously were covered by a dedicated "invalid_input"
* Add name back to device tracker and lock
* Add name to media player
* Add name to update
* Update snapshot
* Keep none name on Update
* Re-add update
* Decouple climate from MyFan
* Add tests
* Prepare for auto change
* Handle both modes
* Fix import
* Remove reference to FAN map
* Correct auto fan logic
* Remove multiline ternary operator
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Fix coverage
* fix tests
* ruff
* Test auto fan mode with snapshot
* add more testing
* Add switch testing
* Fix a bug caught by new tests
* Remove ineffective snapshot tests
* Readd snapshots but use args
---------
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Add foot warmer support
* Add Tests for foot warmers
* Move attr options out of constructor
* Change options to lowercase
* Update test and translations
* Switch back to entity
* Update homeassistant/components/sleepiq/strings.json
---------
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* Add config flow to Streamlabs water
* Add config flow to Streamlabs water
* Add config flow to Streamlabs water
* Add issue when import is successful
* Remove import issue when entry already exists
* Remove import issue when entry already exists
* Fix feedback
* Fix feedback
---------
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* initial work on alarm
* final work on alarm
* coveragerc
* add tests
* add code validation
* remove sensor changes for a dedicated PR
* code optimization and cleanup
* tweaks
* tweak #2
* apply suggestion
* code quality
* code quality #2
* fix cover.py
* api typing
* use base classes where possibile
* apply const as per review comment
* cleanup unload entry
* apply review comments
* Add config flow to Netgear LTE
* uno mas
* uno mas
* forgot one
* uno mas
* uno mas
* apply suggestions
* tweak user step
* fix load/unload/dep
* clean up
* fix tests
* test yaml before importing
* uno mas
* uno mas
* uno mas
* uno mas
* uno mas
* fix startup hanging
* break out yaml import
* fix doc string
---------
Co-authored-by: Robert Resch <robert@resch.dev>
* Add debouncer
* Avoid having 3 calls
* Debounce causes extra refresh in reload window
* Seperate disabled test to avoid latent refresh
---------
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Add select platform to drop_connect integration
* Fix select test
* Fix minor issues
* Make function definition more specific
* Revert change to switch.py for inclusion in separate PR
* Improve typing
* Add translation keys for select options
* Fix set function typing
* Remove redundant value check
* Remove args that match defaults
* Add diagnostics to ccm15
* Update homeassistant/components/ccm15/diagnostics.py
Co-authored-by: J. Nick Koston <nick@koston.org>
---------
Co-authored-by: J. Nick Koston <nick@koston.org>
* Add energy usage sensor to A. O. Smith integration
* Address review comments
* Address review comment
* Address review comment
* Create device outside of the entity class
* Address review comment
* remove platinum
* Add switches to drop_connect integration
* Let device update state
* Simplify icon property
* Use constants for icon names
* Add simulated responses from devices
* Use keyed form for switch value
* Clean up properties