Jan Harkes
73859f59f0
Make yaml config parser errors look less like bugs. ( #1776 )
...
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
2016-04-09 15:25:01 -07:00
Jan Harkes
d6abdc0d4e
Add line numbers when we find duplicate keys. ( #1750 )
2016-04-08 20:53:27 -07:00
Fabian Affolter
2e44166854
Change to freegeoip.io and add a second service as fall-back
2016-04-06 10:25:40 -07:00
Jan Harkes
dbbbed404c
Detect duplicate keys in configuration.yaml.
2016-04-05 21:21:16 -07:00
Paulus Schoutsen
13d7f742a7
Add thread names
2016-03-12 16:54:31 -08:00
Paulus Schoutsen
b9856a2af5
Fix final pep257 issues
2016-03-09 23:34:38 -08:00
Fabian Affolter
876978d64a
Fix PEP257 issues
2016-03-07 23:20:48 +01:00
Paulus Schoutsen
4e750a4d72
Merge pull request #1417 from fabaff/freegeoip
...
Catch 503 responses by freegeoip.net (Fixes #1378 )
2016-02-27 16:12:47 -08:00
Fabian Affolter
eb8228237e
Catch connection issue with freegeoip.net ( Fixes #1378 )
2016-02-27 23:58:36 +01:00
Paulus Schoutsen
bca4dee30e
Merge pull request #1393 from persandstrom/throttle_fix
...
Throttle should work on a single method
2016-02-27 14:49:56 -08:00
Per Sandström
562db5ea4c
Throttle for two methonds in same class
2016-02-27 23:18:56 +01:00
Fabian Affolter
213cc920d0
Move template to helpers
2016-02-23 21:19:10 +01:00
Paulus Schoutsen
3d8e9b4261
Lint fixes
2016-02-21 13:09:49 -08:00
Paulus Schoutsen
7c6dcdb082
Catch an extra error that could break util.convert
2016-02-21 11:23:16 -08:00
Paulus Schoutsen
c3bb6d32aa
Add closest template helper
2016-02-21 11:13:40 -08:00
Paulus Schoutsen
9f5f13644a
Add template multiply test
2016-02-21 11:12:37 -08:00
Paulus Schoutsen
7805d2800c
Expose current time object instead of method to retrieve (thanks @fabaff)
2016-02-21 09:32:43 -08:00
Paulus Schoutsen
9ad2cf7b7a
Adjust template rounding tests
2016-02-20 21:59:16 -08:00
Paulus Schoutsen
6ac54b20c7
Add template distance helper
2016-02-20 21:58:53 -08:00
Paulus Schoutsen
6847dac582
Expose current time in templates
...
Fixes #1282
2016-02-20 20:58:01 -08:00
Paulus Schoutsen
e80309c03c
Fix imports (using isort)
2016-02-18 21:27:50 -08:00
MartinHjelmare
6e8c79d531
Change refactor structure
...
* Make a flatter one level inheritance, with MySensorsLight as parent
with four children, one per light type.
* Break out helper methods. One per plain light, dimmer and RGB/RGBW
children and per update, turn_on and turn_off, nine in total. Put
these in the parent.
* Call the helper methods as needed from the child methods update,
turn_on and turn_off.
* Change name of MySensorsLightLight to MySensorsLightPlain.
* Fix module docstrings according to pep257.
* Change name of color util method from rgb_hex_to_list to
rgb_hex_to_rgb_list.
* Add unit tests for rgb_hex_to_rgb_list.
2016-02-18 02:04:06 +01:00
MartinHjelmare
03423cc3a9
Refactor mysensors light
...
* Add a light entity class per V_LIGHT, V_DIMMER, V_RGB and V_RGBW.
Make these classes inherit each other up to MySensorsLight class.
* Map the entity classes to their S_TYPE in a dict.
* Check if an entity class map or just an entity class have been passed
to pf_callback_factory before using the entity_class variable in
homeassistant/components/mysensors.py.
* Add rgb_hex_to_list function in homeassistant/util/color.py.
2016-02-18 02:04:06 +01:00
Paulus Schoutsen
68803a46b6
Thread pool tweaks
2016-02-14 23:01:49 -08:00
Paulus Schoutsen
b0948bef5f
Make State class immutable
2016-02-09 23:27:01 -08:00
Ryan Kraus
7a00bf8696
Fixed time zone conversion with no TZ specified
...
Using .replace to set the current time zone appears to not handle
things correctly. The proper way to do this is apparently .localize.
2016-02-06 21:31:07 -05:00
Paulus Schoutsen
a5db23afa4
Mock util.location by default
2016-02-04 22:26:02 -08:00
Paulus Schoutsen
a0f6f3ac22
Merge pull request #1085 from molobrakos/yaml_safe_load
...
use yaml safe loader
2016-02-01 08:15:32 -08:00
Paulus Schoutsen
0b8e097705
Remove unused environment util
2016-01-31 08:58:30 -08:00
Erik
4b253d17ba
use yaml safe loader
2016-01-31 00:46:08 +01:00
Paulus Schoutsen
ef132e4583
Add tests for color util
2016-01-29 18:44:21 -08:00
Fabian Affolter
7aba78f96e
Update docstrings
2016-01-27 00:08:06 +01:00
Paulus Schoutsen
bc19ef66bf
Move split_entity_id to helpers
2016-01-23 22:49:49 -08:00
Paulus Schoutsen
de08f0afaa
Load YAML config into an ordered dict
2016-01-23 22:41:01 -08:00
Andrew Thigpen
11f32d0500
Add is_state_attr method.
...
Returns True if the entity exists and has an attribute with the given
name and value.
2015-12-31 14:58:18 -06:00
Paulus Schoutsen
586be7fad1
Prevent division by 0 xy->rgb color conversion
2015-12-29 00:09:38 -08:00
Paulus Schoutsen
ab5a3f9de3
Clean up YR sensor
2015-12-27 11:07:25 -08:00
Paulus Schoutsen
f73f824e0e
Make template states var callable
2015-12-12 22:19:37 -08:00
Paulus Schoutsen
360b99be59
Add template is_state method
2015-12-12 22:19:12 -08:00
Paulus Schoutsen
2b975c8620
Add flexible error value for value template parsing
2015-12-12 10:35:15 -08:00
Paulus Schoutsen
b1bf6a609e
Catch exceptions when error rendering templates
2015-12-11 19:07:03 -08:00
Paulus Schoutsen
5c63862054
Fix template rounding
2015-12-11 18:45:53 -08:00
Paulus Schoutsen
d55fda28c2
Add value renderer helper method
2015-12-10 21:38:35 -08:00
Paulus Schoutsen
7acef84aad
Add variable support to template rendering
2015-12-10 21:16:05 -08:00
Paulus Schoutsen
0dcc69d800
Fix template rounding
2015-12-10 20:47:06 -08:00
Paulus Schoutsen
af09a305cf
Add multiply template filter
2015-12-10 20:47:06 -08:00
Paulus Schoutsen
de68d3355a
Add template support
2015-12-10 20:47:05 -08:00
Paulus Schoutsen
a301d869d7
PyLint 1.5 fixes
2015-11-29 13:49:05 -08:00
Paulus Schoutsen
6135b87b1d
Log error if unable to install package
2015-11-15 02:05:13 -08:00
Paulus Schoutsen
4fb301b7a9
Check global installed packages
2015-11-08 22:55:22 -08:00