Commit Graph

292 Commits (1e28ae49f909e5d38a475a4cd528f3ea118e252a)

Author SHA1 Message Date
andrey-git 1fb372ffdb Apply new customize format to Zwave (#5603) 2017-01-28 22:29:51 +02:00
Johann Kellerman f2870c3103 [core.config] Support customize in packages (#5543)
* Support customize in packages

* GMT

* Update test_config.py
2017-01-26 22:26:49 -08:00
andrey-git b7e477fbba Copy val in config.py before modifying (#5520)
* Copy val before modifying

* Bad line location
2017-01-23 13:24:13 -08:00
andrey-git addc2c4340 Allow easier customization of whole domain, entity lists, globs. (#5215) 2017-01-22 21:19:50 +02:00
Johann Kellerman 9f765836f8 [core] Add 'packages' to the config (#5140)
* Initial

* Merge dicts and lists

* feedback

* Move to homeassistant

* feedback

* increase_coverage

* kick_the_hound
2017-01-13 22:01:47 -08:00
Paulus Schoutsen ed0d14c902 Base url: Fix external port different from internal port (#4990)
* Base url: Fix external port different from internal port

* Add base_url example to new config
2016-12-18 14:59:45 -08:00
Paulus Schoutsen d2bbc6ef70 Upgrade linter (#4461) 2016-11-18 21:47:59 -08:00
Fabian Affolter be272ac64a Disable too-many-* (#4107)
* Disable too-many-* and too-few-public-methods

* Remove globally disabled pylint warnings
2016-10-30 22:18:53 +01:00
Pascal Vizeli 825ee3612d fix some comments spell (#4082)
* fix some comments

* fix in an executor

* address paulus comments
2016-10-28 21:26:52 +02:00
Pascal Vizeli d5368f6f78 Async bootstrap / component init (#3991)
* Async bootstrap

* Adress comments

* Fix tests

* More fixes

* Tests fixes
2016-10-27 00:16:23 -07:00
Fabian Affolter a998846961 Add unit to comment (#3452) 2016-09-19 23:17:52 -07:00
Martin Hjelmare 9afb1d8c0d Fix unit log message (#2823)
* 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
2016-08-15 22:12:43 -07:00
Paulus Schoutsen 0b7b0e54ba Move unit system to util (#2763) 2016-08-08 20:42:25 -07:00
Paulus Schoutsen 640a8b5a7f Limit dependencies of HA core (#2762) 2016-08-08 20:21:40 -07:00
Fabian Heredia Montiel 0377338a81 Improvement typing (#2735)
* 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
2016-08-07 16:26:35 -07:00
Teagan M. Glenn 26526ca57a Add unit system support
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
2016-08-04 22:02:19 -07:00
Paulus Schoutsen 1a64f14bea Add commented out default password (#2656) 2016-07-30 10:40:51 -07:00
Fabian Heredia Montiel 08226a4864 Type Hints - __main__ (#2574)
* Add __main__ type hints

* Fix most errors of __main__

* Add ignore for script.run()

* Add type annotations for from_config_dict and from_config_file

* Fix errors

* Fix requirement error

* Add mypy type check to tests

* Enable travis typing check

* Messed up the tox deps

* Laxer type checker
2016-07-20 22:38:52 -07:00
Fabian Affolter 0f4acb59fe Change schema for elevation to int (#2436) 2016-07-05 08:01:59 -07:00
Paulus Schoutsen 6714392e9c Move elevation to core config and clean up HTTP mocking in tests (#2378)
* 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
2016-06-27 09:02:45 -07:00
Paulus Schoutsen a70f922a71 ps - add reload core config service (#2350) 2016-06-22 09:13:18 -07:00
Paulus Schoutsen 2e79e9d5bb Correct celcius to celsius (#1860) 2016-04-19 20:30:44 -07:00
Daniel 00eda74c7e Add yr weather component to default config 2016-03-30 11:33:35 +02:00
Paulus Schoutsen 5baa98b79f Add initial config validation 2016-03-28 23:46:12 -07:00
Fabian Affolter 897b5c668f Fix PEP257 issues 2016-03-08 00:06:04 +01:00
Paulus Schoutsen e80309c03c Fix imports (using isort) 2016-02-18 21:27:50 -08:00
Paulus Schoutsen de08f0afaa Load YAML config into an ordered dict 2016-01-23 22:41:01 -08:00
Paulus Schoutsen a301d869d7 PyLint 1.5 fixes 2015-11-29 13:49:05 -08:00
Ryan Kraus d01ed9788f Added updater to set of default components 2015-11-15 20:03:45 -05:00
Roy Hooper d0cda964ac Handle UTF-8 in config file. 2015-09-07 10:56:16 -04:00
Paulus Schoutsen 58afbecd05 Speed up tests 2015-09-01 00:18:26 -07:00
Paulus Schoutsen a5a1f30798 Make launch more smooth 2015-08-29 23:02:07 -07:00
Ryan Kraus 6fdf9b8d7c Many changes to cleanup config directory and lib installations.
Cleaned up default config directory determination.
Made bootstrap creators for HA always set config directory.
Made bootstrap creators set the local library in the Python Path.
Moved all exceptions to their own file to make imports easier.
Moved default configuration directory be in the users’ profile.
Moved pip installs to be done to a lib folder in the config directory.
Reduced requirements.txt to only the barebones reqs.
2015-08-29 21:11:24 -04:00
Paulus Schoutsen ba7b9c625e Add an introduction component to support first usage 2015-08-27 01:06:41 -07:00
Paulus Schoutsen 1b89a502c4 Extract core into own submodule 2015-08-16 20:44:46 -07:00
Paulus Schoutsen aa20b94927 Remove support for old home-assistant.conf file 2015-08-04 16:21:25 -04:00
Paulus Schoutsen 7870e9a5e2 Minor cleanup core 2015-08-03 17:05:33 +02:00
Paulus Schoutsen aeae7c2c02 Reorganize util methods 2015-07-07 00:01:17 -07:00
Paulus Schoutsen a557cf388b Better approach writing default configuration 2015-06-01 22:50:57 -07:00
Andrew Thigpen fc560d179e Fix issues with YAML include tag.
Calling load_yaml_config_file(config_path) causes issues when trying to
load from multiple files in a directory since config_path is modified in
the closure.

This also separates the parse code block into its own function so that
there is no restriction that the object be a dictionary for included
files.  This means that scalars, lists, etc. can also be stored in
separate files -- for example, the scene component expects a list.
2015-05-16 11:52:27 -05:00
Andrew Thigpen 6ef60aa979 Add include YAML tag.
Allows including other files in the main configuration.yaml file.  With
this functionality, passwords or other sensitive information can be
stored in a separate file from the main configuration.
2015-05-15 20:10:30 -05:00
Paulus Schoutsen ad016de653 Move config code to separate module + test cover it 2015-04-26 10:05:01 -07:00