* Type check all helpers, add inline exclusions for work in progress
* Remove unused Script._template_cache
* Add some missing type hints
* Remove unneeded type: ignore
* Type hint fixes
* Mypy assistance tweaks
* Don't look for None in deprecated config "at most once" check
* Avoid None name slugify attempt when generating entity id
* Avoid None state store attempt on entity remove
* Start moving parts of yaml utils to own module
Move parts of yaml loader out of the single large file and start
to create the structure of the yaml loaders in Ansible [0].
[0]: https://github.com/ansible/ansible/tree/devel/lib/ansible/parsing/yaml
* Finish yaml migration, update tests and mocks
* Move code around to finish the migration
* Update the mocks so that `open` is patched in
`homeassistant.util.yaml.loader` instead of
`homeassistant.util.yaml`.
* Updated mypy ignores
* Updated external API of `homeasistant.util.yaml`, see below:
Checked what part of the api of `homeassistant.util.yaml` was actually
called from outside the tests and added an `__ALL__` that contains only
these elements.
Updated the tests so that references to internal parts of the API (e.g.
the yaml module imported into `homeassistant.util.yaml.loader`) are
referenced directly from `homeassistant.util.yaml.loader`.
In `tests/test_yaml.py` the import `yaml` refers to
`homeassistant.util.yaml` and `yaml_loader` refers to `~.loader`.
Future work that remains for the next iteration is to create a custom
SafeConstructor and refers to that instead of monkey patching `yaml` with
custom loaders.
* Update mocks in yaml dumper, check_config
## Description:
Switches elevation helper to use [Open Elevation](https://open-elevation.com/) instead of Google Maps API which now requires a API key. It's a drop in replacement for Google Maps too!
**Related issue (if applicable):** fixes#19860
## Checklist:
- [x] The code change is tested and works locally.
- [x] Local tests pass with `tox`. **Your PR cannot be merged unless tests pass**
- [x] There is no commented out code in this PR.
* Add gamut capability to color util
* Include gamut in hue_test
* Improve Philips Hue color conversion
* correct import for new location hue.light
* include file changes between PR's
* update aiohue version
* update aiohue version
* update aiohue version
* fix hue_test
Now Idea why it failed compared to the previous time
* Include gamut in hue_test
* fix hue_test
* Try to test hue gamut conversion
supply a color that is well outside the color gamut of the light, and see if the response is correctly converted to within the reach of the light.
* switch from gamut A to gamut B for the tests.
* remove white space in blanck line
* Fix gamut hue test
* Add Gamut tests for the util.color
* fix hue gamut test
* fix hue gamut test
* Improve Philips Hue color conversion
* Restore states through a JSON store
* Accept entity_id directly in restore state helper
* Keep states stored between runs for a limited time
* Remove warning
* Add cloud webhook support
* Simplify payload
* Add cloud http api tests
* Fix tests
* Lint
* Handle cloud webhooks
* Fix things
* Fix name
* Rename it to cloudhook
* Final rename
* Final final rename?
* Fix docstring
* More tests
* Lint
* Add types
* Fix things
* Enable BMW component to be unit system aware
* lint fixes
* use constants for config entries
* remove configuration from component and rely only on HA config of unit_system
* remove unused import
* update code to reflect feedback
* lint fixes
* remove unnecessary comments
* rework return statement to satisfy pylint
* more lint fixes
* add tests for volume utils
* lint fixes
* more lint fixes
* remove unnecessary comments
* Fixed file corruption bugs in private storage code.
* Restoring fixed test case.
* Implemented test suite for utils/json.py
* Added new unit test cases for util/json.py
* Dixed formatting nags
* Fixed more nags from the Hound
* Added doc strings to some very short functions
* Fixing lint's complains about my choice of parts of speach. Sigh.
* Moved atomic save operations down into util/json.py so that all benefit.
Added extra clean-up code to ensure that temporary files are removed in
case of errors.
Updated emulated_hue unit tests to avoid errors.
* Apparently 'e' is not allows as a variable name for an exception...
* Addded support for private storage.
Include 'private' flag parameters to the Store class and save_json function.
Updated various authentication and onboarding classes to use private stores.
Fixed unit test for emulated_hue which used a mock patch on save_json().
* Fixed Hound formatting issues not detected by local linting.
* De-run_forever()-ization
* Use asyncio.run (or our own implementation on Python <3.7)
* hass.start is only used by tests
* setup_and_run_hass() is now async
* Add "main" async hass.run method
* move SIGINT handling to helpers/signal.py
* add flag to .run to disable hass's signal handlers
* Teach async_start and async_stop to not step on each other
(more than necessary)
* shorten over-long lines
* restore missing "import asyncio"
* move run_asyncio to homeassistant.util.async_
* LOGGER: warn => warning
* Add "force" flag to async_stop
only useful for testing
* Add 'attrs==18.2.0' to requirements_all.txt
Required for keeping requirements_test_all.txt in sync, where it is in
turn required to prevent auto-downgrading "attrs" during "pip install"
* Fixes for mypy
* Fix "mock_signal" fixture
* Revert mistaken edit
* Flake8 fixes
* mypy fixes
* pylint fix
* Revert adding attrs== to requirements_test*.txt
solved by using "pip -c"
* Rename "run" to "async_run", as per calling conventions
* Don't treat typing as an "in-between" module for import order
That was a < 3.5 era thing.
* Tighten scope of some pylint unused-import disables
To avoid isort moving a top level one around, undesirably broadening its
scope.
## Description:
More fixes flagged by pylint 2 that don't hurt to have before the actual pylint 2 upgrade (which I'll submit soon).
## Checklist:
- [ ] The code change is tested and works locally.
- [x] Local tests pass with `tox`. **Your PR cannot be merged unless tests pass**
## Description:
More typing improvements.
Switch to using `mypy.ini` for flexibility
Add `warn_return_any` check except in `homeassistant.util.yaml` that does typing hacks. Fix some type annotations as resulting from this check and ignore others were fixing is hard.
## Checklist:
- [x] The code change is tested and works locally.
- [x] Local tests pass with `tox`. **Your PR cannot be merged unless tests pass**
## Description:
Make typing checks more strict: add `--strict-optional` flag that forbids implicit None return type. This flag will become default in the next version of mypy (0.600)
Add `homeassistant/util/` to checked dirs.
## Checklist:
- [x] The code change is tested and works locally.
- [x] Local tests pass with `tox`. **Your PR cannot be merged unless tests pass**
* Add storage helper
* Migrate config entries to use the storage helper
* Make sure tests do not do I/O
* Lint
* Add versions to stored data
* Add more instance variables
* Make migrator load config if nothing to migrate
* Address comments
* Implement thermostat support for Alexa
* util.temperature: Support interval conversions
* Use climate.ATTR_OPERATION_MODE for Alexa thermostat mode
* Switch coroutines to async/await
* Log all Alexa error events
* Accept and report both xy and RGB color for lights
* Fix demo light supported_features
* Add new XY color util functions
* Always make color changes available as xy and RGB
* Always expose color as RGB and XY
* Consolidate color supported_features
* Test fixes
* Additional test fix
* Use hue/sat as the hass core color interface
* Tests updates
* Assume MQTT RGB devices need full RGB brightness
* Convert new platforms
* More migration
* Use float for HS API
* Fix backwards conversion for KNX lights
* Adjust limitless min saturation for new scale
* phue -> aiohue
* Clean up
* Fix config
* Address comments
* Typo
* Fix rebase error
* Mark light as unavailable when bridge is disconnected
* Tests
* Make Throttle work with double delay and async
* Rework update logic
* Don't resolve host to IP
* Clarify comment
* No longer do unnecessary updates
* Add more doc
* Another comment update
* Wrap up tests
* Lint
* Fix tests
* PyLint does not like mix 'n match async and coroutine
* Lint
* Update aiohue to 1.2
* Lint
* Fix await MagicMock
* Add view to support backend translation fetching
* Load backend translations from component json
* Translations for season sensor
* Scripts to merge and unpack Lokalise translations
* Fix copy paste error
* Serve post-lokalise translations to frontend
* Linting
* Auto-deploy translations with Travis
* Commit post-lokalise translation files
* Split logic into more helper functions
* Fall back to English for missing keys
* Move local translation copies to `.translations`
* Linting
* Initial tests
* Remove unnecessary file check
* Convert translation helper to async/await
* Convert translation helper tests to async/await
* Use set subtraction to find missing_components
* load_translation_files use component->file mapping
* Remove duplicated resources fetching
Get to take advantage of the slick Python 3.5 dict merging here.
* Switch to live project ID
* Make color_name_to_rgb raise
* Add Light Set Color intent
* Move some methods around
* Cleanup
* Prevent 1 more func call
* Make a generic Set intent for light
* Lint
* lint
* Upgrade pylint to 1.8.1
* Fix no-else-return
* Fix bad-whitespace
* Fix too-many-nested-blocks
* Fix raising-format-tuple
See https://github.com/PyCQA/pylint/blob/master/doc/whatsnew/1.8.rst
* Fix len-as-condition
* Fix logging-not-lazy
Not sure about that TEMP_CELSIUS though, but internally it's probably just like if you concatenated any other (variable) string
* Fix stop-iteration-return
* Fix useless-super-delegation
* Fix trailing-comma-tuple
Both of these seem to simply be bugs:
* Nest: The value of self._humidity never seems to be used anywhere
* Dovado: The called API method seems to expect a "normal" number
* Fix redefined-argument-from-local
* Fix consider-using-enumerate
* Fix wrong-import-order
* Fix arguments-differ
* Fix missed no-else-return
* Fix no-member and related
* Fix signatures-differ
* Revert "Upgrade pylint to 1.8.1"
This reverts commit af78aa00f125a7d34add97b9d50c14db48412211.
* Fix arguments-differ
* except for device_tracker
* Cleanup
* Fix test using positional argument
* Fix line too long
I forgot to run flake8 - shame on me... 🙃
* Fix bad-option-value for 1.6.5
* Fix arguments-differ for device_tracker
* Upgrade pylint to 1.8.2
* 👕 Fix missed no-member
* Entity#unique_id defaults to None
* Initial commit entity registry
* Clean up unique_id property
* Lint
* Add tests to entity component
* Lint
* Restore some unique ids
* Spelling
* Remove use of IP address for unique ID
* Add tests
* Add tests
* Fix tests
* Add some docs
* Add one more test
* Fix new test…
The current code relies on the assumption that the first invocation will never specify no_throttle=True.
However that puts us in a pickle when writing unit tests: if we had a fictitious:
def setup_platform():
update()
@Throttle(MIN_TIME_BETWEEN_SCANS)
def update():
pass
Then given multiple tests, the second and some of subsequent tests would be throttled (depending on timing).
But we also can't change that code to call `update(no_throttle=True)' because that's not currently accepted.
This diff shouldn't change the visibile behavior of any component, but allows this extra flexibility.
* Implement adjustment
* Add color support
* fix lint
* Fix lint & use only RGB
* fix HSB + Test
* Add tests & fix bugs
* add rgb test
* add setColorTemperature
* Add color light support + tests
* Fix color temp
* use kelvin for converting
* use correct calculation
* Xiaomi vacuum as component with switch, sensors and services
- Conversion from switch platform to async component.
- Add services proposed in #8416 to the new component, with shorter names.
- Add sensors for the vacuum robot as a selectable list from `battery`, `state`, `error`, `fanspeed`, `clean_time` and `clean_area` (the state attributes of the switch). The sensors don't poll, but listen to a signal to update the state, the switch fires this signal when updating.
- Assign default icons to sensors and the switch (`mdi:google-circles-group` looks like the robot!)
* path change in requirements_all (from switch platform to component)
* copy pasting is a bad habit
* services to the components services.yaml, modify .coveragerc
* review: use with multiple hosts, fix calls to async_add_devices, fix ranges for services
* `icon_for_battery_level` util method
* Xiaomi vacuum as platform of new component vacuum
- Created new component `vacuum` from a ToggleEntity.
- Add services `turn_on`, `turn_off`, `cleaning_play_pause`, `stop`, `return_to_base`, `locate`, `set_fanspeed` and `send_command`.
- Remove the main switch for the xiaomi vacuum (the toggable main entity is the switch).
- Add `support flags` for the common services
- Assign default icons to sensors and the switch (`mdi:google-circles-group` looks like the robot!)
- Move services descriptions to a yaml file for the new component.
- Update requirements_all.
- Update coveragerc.
* fix coveragerc
* fix battery icon helper to use more icons
* remove sensors, create properties and support flags for custom UI
* cleaning
* updated state_attrs for filtering in UI, renamed platform to simply `xiaomi`
* fix platform rename
* change fanspeed and expose `fanspeed_list` to use speed steps
* minor fixes
- Rename service `start_pause`
- Add 'Error' attribute only if `got_error`.
- Minor changes
* rename state attrs
* rename state attrs
* review changes: cut fan__speed, style changes, remove logging, and more
* add ATTR_COMMAND = 'command' to const
* pop entity_id from service data
* remove property accessor for vacuum object
* lint fix
* fix extra attrs names
* module level functions for calling the services
* params as optional keyword for `send_command`
* params as optional keyword for `send_command`, remove debug logs
* explicit parameters for `set_fan_speed` and `send_command`
* Demo platform for the vacuum component
* vacuum tests for the Demo platform
* some fixes
* don't omit vacuum
* vacuum tests for the Xiaomi platform
* fix test
* fix
* fix xiaomi test
* fix coveragerc
* test send command
* fix coveragerc
* fix string formatting
* The coverage is to low. It need 93% or more
* Use pip install --user if venv not active
* Set PYTHONUSERBASE to deps directory, when installing with --user
option.
* Reset --prefix option to workaround incompatability when installing
with --user option. This requires pip version 8.0.0 or greater.
* Require pip version 8.0.3.
* Do not delete deps directory on home assistant upgrade.
* Fix local lib mount and check package exist.
* Update and add tests
* Fix upgrade from before version 0.46
* Extract function to get user site
* Add function(s) to package util to get user site.
* Use async subprocess for one of the functions to get user site.
* Add function to package util to check if virtual environment is
active.
* Add and update tests.
* Update version for last removal of deps dir
* Address comments
* Rewrite package util tests with pytest
* Rewrite all existing unittest class based tests for package util as
test functions, and capitalize pytest fixtures.
* Add test for installing with target inside venv.
* Add color_util.color_hsv_to_RGB
* Use helper functions for LIFX conversions
The LIFX API uses 16 bits for saturation/brightness while HA uses 8 bits.
Using helper functions makes the conversion a bit nicer and less prone
to off-by-one issues.
The colorsys library uses 0.0-1.0 but we can avoid that by using the HA
color_util converters instead.
* Remove global limit on white light temperature
Here are the supported temperatures of some popular bulbs:
Philips Hue: 2000K-6500K (the current 500-154 mired range)
LIFX Color 1000: 2500K-9000K
IKEA TRÅDFRI: 2200K, 2700K, 4000K
Obviously, Home Assistant cannot enforce a global limit and work properly
with all of these bulbs. So just remove the limit and leave it up to each
platform to work it out.
This commit updates the existing users and adds a clamp to Hue (where the
limit appears to have originated). It does not attempt to update other
platforms that might need extra handling of the larger range that is now
possible.
* Add min_mireds/max_mireds state attributes to lights
* Support min_mireds/max_mireds with LIFX lights
This makes more sense because the input and output brightness is the same.
We currently convert through RGB which does contain a brightness so we supply
an arbitrary value as input and discard the output.
* After rebase and all fixes
* Added color_rgb_to_hex to util.color
* Added test_color_rgb_to_hex
* Changed reference to color_rgb_to_hex
* Bumped to pytradfri 0.5, having support for retry
* Bumped to pytradfri 0.5, having support for retry
* Bumped to pytradfri 0.5, having support for retry
* Bumped to pytradfri 0.5, having support for retry
* Rolled back to 0.4
* Rolled back to 0.4
When the user exceeds the request limit for google APIs, the response status stays at 200 but the response body is different:
```
{
"error_message" : "You have exceeded your daily request quota for this API. We recommend registering for a key at the Google Developers Console: https://console.developers.google.com/apis/credentials?project=_",
"results" : [],
"status" : "OVER_QUERY_LIMIT"
}
```
This prevents HA from creating the initial configuration
* Update to Current RGB D65 Conversion
As per Philips Hue https://developers.meethue.com/documentation/color-conversions-rgb-xy
* Update the source of the XYZ to RGB formulas
* Fix Whitespace
* Update Whitespace
* Update Tests for new Formulas
* Update Tests
* Update XY_Brightness_to_hsv tests
* Update test_color.py
* Fix for OSRAM lights connected to hue bridge
Do not send command "effect = none" to OSRAM lights
Osram lights connected to a hue bridge do not seem to handle "effect =
none" very well. Most of the times they jump to the selected color and
then change to red within a second.
Osram lights connected to a hue bridge do not handle xy values outside
of their gamut. Since they just stay at their old color value, handling
the UI is very unpredictable. Sending HSV values to the lights fixes this.
* Add tests for new util methods
* Expose isort preferences for tools.
* Adhere to pylints sorted imports requirement.
* More documentation, set typing in between stdlib and 3rd party.
* Move HTTP to own folder
* Break HTTP into middlewares
* Lint
* Split tests per middleware
* Clean up HTTP tests
* Make HomeAssistantViews more stateless
* Lint
* Make HTTP setup async
* Climate: more consistent units
* Prevent unnecessary conversion in entity component
* int -> round
* Disable Google tests because they connect to the internet
* Remove default conversion rounding F->C
* Add rounding of temp to weather comp
* Fix equality
* Maintain precision when converting temp in entity
* Revert "Disable Google tests because they connect to the internet"
This reverts commit b60485dc19.
* Lazy initialise the worker pool
* Minimize pool initialization in core tests
* Fix tests on Python 3.4
* Remove passing in thread count to mock HASS
* Tests: Allow pool by default for threaded, disable for async
* Remove JobPriority for thread pool
* Fix wrong block_till_done
* EmulatedHue: Remove unused test code
* Zigbee: do not touch hass.pool
* Init loop in add_job
* Fix core test
* Fix random sensor test
* Move worker pool monitoring to be time based instead of add_job based.
* Stub out worker pool monitor during tests
* Add test for monitor worker pool.
* Improve naming
* Test stop_monitor coroutine
* Add async_create_timer test
* Finish rename create_timer
* Add event loop to the core
* Add block_till_done to HA core object
* Fix some tests
* Linting core
* Fix statemachine tests
* Core test fixes
* fix block_till_done to wait for loop and queue to empty
* fix test_core for passing, and correct start/stop/block_till_done
* Fix remote tests
* Fix tests: block_till_done
* Fix linting
* Fix more tests
* Fix final linting
* Fix remote test
* remove unnecessary import
* reduce sleep to avoid slowing down the tests excessively
* fix remaining tests to wait for non-threadsafe operations
* Add async_ doc strings for event loop / coroutine info
* Fix command line test to block for the right timeout
* Fix py3.4.2 loop var access
* Fix SERVICE_CALL_LIMIT being in effect for other tests
* Fix lint errors
* Fix lint error with proper placement
* Fix slave start to not start a timer
* Add asyncio compatible listeners.
* Increase min Python version to 3.4.2
* Move async backports to util
* Add backported async tests
* Fix linting
* Simplify Python version check
* Fix lint
* Remove unneeded try/except and queue listener appproriately.
* Fix tuple vs. list unorderable error on version compare.
* Fix version tests
* Move secret cache out of loader so it can be referenced by other folders
* Unit test to verify secrets from another folder work & see if it overrides parent secret
* Clear secret cache after load
* Fix log message for deprecated temp key
* Use string formatting and pass constant variables as arguments in log
message to show correct name of config keys.
* Fix import order
* Fix: Circular dependencies of internal files
* Change: dt.date for Date and dt.datetime for DateTime
* Use NewType if available
* FIX: Wrong version test
* Remove: Date and DateTime types due to error
* Change to HomeAssistantType
* General Improvement of Typing
* Improve typing config_validation
* Improve typing script
* General Typing Improvements
* Improve NewType check
* Improve typing db_migrator
* Improve util/__init__ typing
* Improve helpers/location typing
* Regroup imports and remove pylint: disable=ungrouped-imports
* General typing improvements
Add unit symbol constants
Initial unit system object
Import more constants
Pydoc for unit system file
Import constants for configuration validation
Unit system validation method
Typing for constants
Inches are valid lengths too
Typings
Change base class to dict - needed for remote api call serialization
Validation
Use dictionary keys
Defined unit systems
Update location util to use metric instead of us fahrenheit
Update constant imports
Import defined unit systems
Update configuration to use unit system
Update schema to use unit system
Update constants
Add imports to core for unit system and distance
Type for config
Default unit system
Convert distance from HASS instance
Update temperature conversion to use unit system
Update temperature conversion
Set unit system based on configuration
Set info unit system
Return unit system dictionary with config dictionary
Auto discover unit system
Update location test for use metric
Update forecast unit system
Update mold indicator unit system
Update thermostat unit system
Update thermostat demo test
Unit tests around unit system
Update test common hass configuration
Update configuration unit tests
There should always be a unit system!
Update core unit tests
Constants typing
Linting issues
Remove unused import
Update fitbit sensor to use application unit system
Update google travel time to use application unit system
Update configuration example
Update dht sensor
Update DHT temperature conversion to use the utility function
Update swagger config
Update my sensors metric flag
Update hvac component temperature conversion
HVAC conversion for temperature
Pull unit from sensor type map
Pull unit from sensor type map
Update the temper sensor unit
Update yWeather sensor unit
Update hvac demo unit test
Set unit test config unit system to metric
Use hass unit system length for default in proximity
Use the name of the system instead of temperature
Use constants from const
Unused import
Forecasted temperature
Fix calculation in case furthest distance is greater than 1000000 units
Remove unneeded constants
Set default length to km or miles
Use constants
Linting doesn't like importing just for typing
Fix reference
Test is expecting meters - set config to meters
Use constant
Use constant
PyDoc for unit test
Should be not in
Rename to units
Change unit system to be an object - not a dictionary
Return tuple in conversion
Move convert to temperature util
Temperature conversion is now in unit system
Update imports
Rename to units
Units is now an object
Use temperature util conversion
Unit system is now an object
Validate and convert unit system config
Return the scalar value in template distance
Test is expecting meters
Update unit tests around unit system
Distance util returns tuple
Fix location info test
Set units
Update unit tests
Convert distance
DOH
Pull out the scalar from the vector
Linting
I really hate python linting
Linting again
BLARG
Unit test documentation
Unit test around is metric flag
Break ternary statement into if/else blocks
Don't use dictionary - use members
is metric flag
Rename constants
Use is metric flag
Move constants to CONST file
Move to const file
Raise error if unit is not expected
Typing
No need to return unit since only performing conversion if it can work
Use constants
Line wrapping
Raise error if invalid value
Remove subscripts from conversion as they are no longer returned as tuples
No longer tuples
No longer tuples
Check for numeric type
Fix string format to use correct variable
Typing
Assert errors raised
Remove subscript
Only convert temperature if we know the unit
If no unit of measurement set - default to HASS config
Convert only if we know the unit
Remove subscription
Fix not in clause
Linting fixes
Wants a boolean
Clearer if-block
Check if the key is in the config first
Missed a couple expecting tuples
Backwards compatibility
No like-y ternary!
Error handling around state setting
Pretty unit system configuration validation
More tuple crap
Use is metric flag
Error handling around min/max temp
Explode if no unit
Pull unit from config
Celsius has a decimal
Unused import
Check if it's a temperature before we try to convert it to a temperature
Linting says too many statements - combine lat/long in a fairly reasonable manner
Backwards compatibility unit test
Better doc
* Allow multiple proximities
* Distance conversion
* Add unit of measurement and conversion to proximity
* Shorten attribute name
* Fix get unit of measurement
* Fix the km <-> m conversion
* Add type check and errors
* first path unit test around distance utility
* Fix numeric type check
* Fix conversion type-os
* Actually set the exception thrown flag
* Test for exact conversion
* More descriptive variable names
* Update method invocation to match change in method name
* Missed a couple variables
* Line continuation
* Fix linting too many return issue
* Break out proximity setup for list of proximity and for single proximity device
* Pass hass to setup function
* Check if setup succeeded for each proximity component
* Change variable name
* Break out branches in convert to avoid too many branches linting error
* Remove disable lint line
* Variables for default properties
* Combine logic
* Test loading multiple proximities for 100% code coverage on proximity component
* Unit test to reach 100%
Fail to configure proximities missing devices
* Fail first before processing
* Combine return statements
* lstrip = bad Teagan
* Utilize string formating instead of concatenation
* Fix variable reference
* Typeo
* Clean up conversion to reduce complexity
* Update unit tests to match code changes on distance util
* Test non numeric value
* Private methods, value type has already been checked.
* Fix deprecated(moved) import
* Add util/dt typing
* Green on mypy util/dt
* Fix some errors
* First part of yping util/yaml
* Add more typing to util/yaml
Default behavior for warm/cold white channels is to assume the white
channel is mixed with the rgb. This is a sane default and should support
the Fibaro RGBW LED controller.
* Stick version numbers
* Move elevation to core config
* Migrate forecast test to requests-mock
* Migrate YR tests to requests-mock
* Add requests_mock to requirements_test.txt
* Move conf code from bootstrap to config
* More config fixes
* Fix some more issues
* Add test for set config and failing auto detect
* Removed webcolors dependency in favor of dictionary lookup.
* Fixed code style errors.
* Moved color dictionary to module per suggestion.
* Removed try/except per suggestion.
* Add support for providing color_name which accepts a CSS3 valid, human readable string such as red or blue
* Forgot the schema validation!
* ugh farcy
* use html5_parse_legacy_color for more input options
* Add webcolors==1.5 to setup.py
* Block pylint no-member errors on tuple
* add color_name_to_rgb test
* whoops
* revert changes to individual platforms
* If color_name is set, pop it off params and set rgb_color with it
* Forgot to reset wink.py
* Import the legacy function as color_name_to_rgb directly
* reset test_color.py
* Improve light services.yaml
"unix" timestamp is number of seconds since Jan 1, 1970 UTC.
This allows scripts that use templates to generate time
deltas in seconds if desired from state attributes such
as last_updated.
Some examples:
timestamp now is
{{ as_timestamp(now) }}
timstamp of last change is
{{ as_timestamp(states.binary_sensor.garage_door.last_changed) }}
seconds since last change is
{{ as_timestamp(now) - as_timestamp(states.binary_sensor.garage_door.last_changed) }}
Instead of nested tracebacks, show a simpler error message.
Config directory: /home/user/.homeassistant
ERROR:homeassistant.util.yaml:duplicate key: "script"
in "/home/user/.homeassistant/configuration.yaml", line 95, column 0
in "/home/user/.homeassistant/configuration.yaml", line 108, column 0