Commit Graph

573 Commits

Author SHA1 Message Date
Otto Winter
f2540bae23
Update .gitignore 2019-05-11 12:21:27 +02:00
Otto Winter
a1a7448868
Dashboard editor live validation (#540)
* Dashboard editor validation

* Improve range detection

* Lint
2019-05-11 11:41:09 +02:00
Otto Winter
e373620393
Use int_range validator (#542)
* Use int_range validator

Just keeping code clean.

* Lint
2019-05-11 11:40:29 +02:00
Otto Winter
23dcfe5075
Revert HLW8012 to use pulse counter (#537) 2019-05-10 22:13:43 +02:00
Otto Winter
7bab279c6a
Auto-Generate esphome.h (#538) 2019-05-10 22:13:26 +02:00
Otto Winter
953d7f6193
Check lambdas for return statement (#539) 2019-05-10 22:13:17 +02:00
Otto Winter
9dd9e523ed
Fix ADC VCC
Fixes https://github.com/esphome/issues/issues/289

Was a linker problem, the macro needs to be defined in global C++ scope (no namespace, not in extern "C" block)
2019-05-10 15:02:59 +02:00
ffabi
66cbfca99c Changed also the datatype of temperatur values to be able to get corr… (#532)
Co-authored-by: Fabian <git@ffabi.com>
2019-05-10 13:49:30 +02:00
puuu
b0e6b48c50 Allow rx_only mode of sds011 component (#534)
fixes the following error if rx_only was defined and update_interval
was not present:

Failed config

sensor.sds011: [source sds011.yaml:62]

  update_interval has no effect in rx_only mode. Please remove it.
2019-05-10 13:48:50 +02:00
puuu
bb1937ab88 Fix compilation of my9231 component (#533)
missing definition of GPIOPin:

In file included from src/esphome/components/my9231/my9231.cpp:1:0:
src/esphome/components/my9231/my9231.h:13:19: error: 'GPIOPin' has not been declared
void set_pin_di(GPIOPin *pin_di) { pin_di_ = pin_di; }
^
src/esphome/components/my9231/my9231.h:14:21: error: 'GPIOPin' has not been declared
void set_pin_dcki(GPIOPin *pin_dcki) { pin_dcki_ = pin_dcki; }
^
src/esphome/components/my9231/my9231.h:51:3: error: 'GPIOPin' does not name a type
GPIOPin *pin_di_;
^
src/esphome/components/my9231/my9231.h:52:3: error: 'GPIOPin' does not name a type
GPIOPin *pin_dcki_;
^
2019-05-10 13:48:38 +02:00
gitolicious
86848b39db Added save & validate button in editor window (#511)
* Added save & validate button in editor window

It felt a bit cumbersome to save&close the editor window, then click the validate button, see an error, locate your device from the list and open the editor again. Now it is possible to save&validate a configuration without leaving the editor.

* Changed modal behavior to close one before the other

* set data-node dynamically

* show upload button on successful validation

* Use disabled class

* Update index.html

* Fix mistake


Co-authored-by: Otto Winter <otto@otto-winter.com>
2019-05-08 15:39:22 +02:00
gitolicious
f2506bb23b Create .editorconfig (#524)
* Create .editorconfig

Code formatting instruction for editors
https://editorconfig.org/

* Add tcc


Co-authored-by: Otto Winter <otto@otto-winter.com>
2019-05-08 15:37:18 +02:00
Otto Winter
3372ddc63d
Lint more filetypes 2019-05-08 15:26:44 +02:00
Otto Winter
3fe9c20188
Format 2019-05-08 14:56:54 +02:00
Otto Winter
95428b4cfe
Lint 2019-05-08 11:40:45 +02:00
Otto Winter
968ff4b619
Fixes 2019-05-08 11:31:06 +02:00
Anders Persson
a07a835eb0 Custom tests (#529)
* Add tests for custom components

* Add more tests
2019-05-08 10:56:52 +02:00
Otto Winter
667457989e
Merge pull request #528 from emwap/patch-2
Further fix of custom_sensor codegen
2019-05-08 10:55:05 +02:00
Otto Winter
bedf1b7483
Fix fastled clockless not loading fastled base
Ref https://github.com/esphome/issues/issues/268
2019-05-08 10:45:44 +02:00
Otto Winter
53c182ad37
Fix native API services not registered
Fixes https://github.com/esphome/issues/issues/290
2019-05-08 10:37:13 +02:00
Otto Winter
ce45c81069
Add longer MAX6675 delay 2019-05-08 10:35:07 +02:00
Otto Winter
1ee85295f2
Lint 2019-05-08 10:17:08 +02:00
Otto Winter
521c080989
Updates 2019-05-08 09:58:03 +02:00
Anders Persson
64541e0e35
Further fix of custom_sensor codegen 2019-05-07 23:30:19 +02:00
Otto Winter
c3d4ef284d
Fix compilation of automations (#525) 2019-05-07 21:39:38 +02:00
Anders Persson
ebb5fadba1 Fix custom_sensor codegen (#526) 2019-05-07 21:39:13 +02:00
mtl010957
c569d022ec Fix MQTT Not Working in dev branch (#527)
* Fix MQTT not working

* Fix minor typo causing compile error
2019-05-07 21:19:30 +02:00
Nico Weichbrodt
58586ea840 Fix compilation of automations 2019-05-03 23:46:59 +02:00
gitolicious
27f431a027 Create .gitpod.yml (#508)
* Create .gitpod.yml

Configure gitpod to install esphome and run dashboard on startup

* Replaced file with folder location

Co-Authored-By: gitolicious <mrjchn@gmail.com>

* Use new setup script


Co-authored-by: Otto Winter <otto@otto-winter.com>
2019-05-01 20:37:55 +02:00
Otto Winter
595dfe7e24
Addressable updates 2019-04-25 10:36:55 +02:00
Otto Winter
766f6c045d
Updates 2019-04-24 23:49:02 +02:00
Otto Winter
0a0713f0e2
Fixes 2019-04-24 18:11:46 +02:00
Otto Winter
5e5b9f2205
Hass.io Ingress (#519)
* Hass.io ingress

* Update

* Remove global vars

* Fix

* Fixes

* Fixes

* Upgrade base image to 1.5.1

* Lint
2019-04-24 17:08:05 +02:00
Otto Winter
e6ff3c287d
Update addressable_light_effect.h 2019-04-24 14:31:51 +02:00
Otto Winter
295585379e
Auto-set LEDC channel
Fixes https://github.com/esphome/issues/issues/258
2019-04-24 14:30:09 +02:00
Otto Winter
c7609ba5e7
Lint 2019-04-22 22:14:48 +02:00
Otto Winter
8e75980ebd
Cleanup dashboard JS (#491)
* Cleanup dashboard JS

* Add vscode

* Save start_mark/end_mark

* Updates

* Updates

* Remove need for cv.nameable

It's a bit hacky but removes so much bloat from integrations

* Add enum helper

* Document APIs, and Improvements

* Fixes

* Fixes

* Update PULL_REQUEST_TEMPLATE.md

* Updates

* Updates

* Updates
2019-04-22 21:56:30 +02:00
Otto Winter
6682c43dfa
🏗 Merge C++ into python codebase (#504)
## Description:

Move esphome-core codebase into esphome (and a bunch of other refactors). See https://github.com/esphome/feature-requests/issues/97

Yes this is a shit ton of work and no there's no way to automate it :( But it will be worth it 👍

Progress:
- Core support (file copy etc): 80%
- Base Abstractions (light, switch): ~50%
- Integrations: ~10%
- Working? Yes, (but only with ported components).

Other refactors:
- Moves all codegen related stuff into a single class: `esphome.codegen` (imported as `cg`)
- Rework coroutine syntax
- Move from `component/platform.py` to `domain/component.py` structure as with HA
- Move all defaults out of C++ and into config validation.
- Remove `make_...` helpers from Application class. Reason: Merge conflicts with every single new integration.
- Pointer Variables are stored globally instead of locally in setup(). Reason: stack size limit.

Future work:
- Rework const.py - Move all `CONF_...` into a conf class (usage `conf.UPDATE_INTERVAL` vs `CONF_UPDATE_INTERVAL`). Reason: Less convoluted import block
- Enable loading from `custom_components` folder.

**Related issue (if applicable):** https://github.com/esphome/feature-requests/issues/97

**Pull request in [esphome-docs](https://github.com/esphome/esphome-docs) with documentation (if applicable):** esphome/esphome-docs#<esphome-docs PR number goes here>

## Checklist:
  - [ ] The code change is tested and works locally.
  - [ ] Tests have been added to verify that the new code works (under `tests/` folder).

If user exposed functionality or configuration variables are added/changed:
  - [ ] Documentation added/updated in [esphomedocs](https://github.com/OttoWinter/esphomedocs).
2019-04-17 12:06:00 +02:00
gitolicious
049807e3ab Escape double quotes and backslashes in ssid and psk (#507)
## Description:
Escape ssid and psk

**Related issue (if applicable):** fixes <link to issue>
https://github.com/esphome/issues/issues/81

**Pull request in [esphome-docs](https://github.com/esphome/esphome-docs) with documentation (if applicable):** esphome/esphome-docs#<esphome-docs PR number goes here>
**Pull request in [esphome-core](https://github.com/esphome/esphome-core) with C++ framework changes (if applicable):** esphome/esphome-core#<esphome-core PR number goes here>

## Checklist:
  - [X] The code change is tested and works locally.
  - [n/a] Tests have been added to verify that the new code works (under `tests/` folder).

If user exposed functionality or configuration variables are added/changed:
  - [n/a] Documentation added/updated in [esphomedocs](https://github.com/OttoWinter/esphomedocs).


Co-authored-by: Otto Winter <otto@otto-winter.com>
2019-04-15 21:49:21 +02:00
sethcohn
336f12b24d Wio_link and wio_node pinout improvements (#505)
Makes configuring these boards easier thru improved definitions.
wio_node pointed to nodemcu base, which was incorrect
wio_link lacked D0, D1, D2, and BUTTON

## Description:
Playing with some WioLinks and ESPHome and discovered that the definition was lacking, figured a quick pull request is the best way to improve things.  Don't have a WioNode but since the documentation says that it's certainly not matching the nodemcu pinout, and more much like a WioLink, figured that's likely to save someone else in the future frustration when they have no luck making a wio_node work out of the box with ESPHome.

Sourced from: https://github.com/Seeed-Studio/Wio_Link/blob/master/boards.json

**Related issue (if applicable):** fixes <link to issue>

**Pull request in [esphome-docs](https://github.com/esphome/esphome-docs) with documentation (if applicable):** esphome/esphome-docs#<esphome-docs PR number goes here>
**Pull request in [esphome-core](https://github.com/esphome/esphome-core) with C++ framework changes (if applicable):** esphome/esphome-core#<esphome-core PR number goes here>

## Checklist:
  - [X] The code change is tested and works locally.
  - [N/A] Tests have been added to verify that the new code works (under `tests/` folder).

If user exposed functionality or configuration variables are added/changed:
  - [N/A] Documentation added/updated in [esphomedocs]
(https://github.com/OttoWinter/esphomedocs).

Might want to add a note somewhere for these boards that all of the connections are power linked to GPIO15 (Grove) and unless you do "mode: INPUT_PULLUP" that pin first, nothing works as expected.   Learned this the hard way.
2019-04-15 21:04:48 +02:00
Otto Winter
be5330b6ae
Simplify coroutine syntax (#503)
* Simplify coroutine syntax

* More

* Lint

* Fix

* More

* Lint
2019-04-09 14:30:12 +02:00
Otto Winter
e90829eef2
Lint 2019-04-08 22:27:47 +02:00
Otto Winter
dc4c1bc225
Use more lazy imports
Speeds up esphome invocation a lot
2019-04-08 22:19:21 +02:00
Otto Winter
a14d12b0c1
Add 'at' time trigger (#493)
## Description:


**Related issue (if applicable):** fixes <link to issue>

**Pull request in [esphome-docs](https://github.com/esphome/esphome-docs) with documentation (if applicable):** esphome/esphome-docs#<esphome-docs PR number goes here>
**Pull request in [esphome-core](https://github.com/esphome/esphome-core) with C++ framework changes (if applicable):** esphome/esphome-core#<esphome-core PR number goes here>

## Checklist:
  - [ ] The code change is tested and works locally.
  - [ ] Tests have been added to verify that the new code works (under `tests/` folder).

If user exposed functionality or configuration variables are added/changed:
  - [ ] Documentation added/updated in [esphomedocs](https://github.com/OttoWinter/esphomedocs).
2019-04-08 21:57:25 +02:00
Otto Winter
526a414743
Add climate support (#502)
## Description:


**Related issue (if applicable):** fixes <link to issue>

**Pull request in [esphome-docs](https://github.com/esphome/esphome-docs) with documentation (if applicable):** esphome/esphome-docs#<esphome-docs PR number goes here>
**Pull request in [esphome-core](https://github.com/esphome/esphome-core) with C++ framework changes (if applicable):** esphome/esphome-core#<esphome-core PR number goes here>

## Checklist:
  - [ ] The code change is tested and works locally.
  - [ ] Tests have been added to verify that the new code works (under `tests/` folder).

If user exposed functionality or configuration variables are added/changed:
  - [ ] Documentation added/updated in [esphomedocs](https://github.com/OttoWinter/esphomedocs).
2019-04-08 21:30:21 +02:00
Otto Winter
7fd5634a51
Add cover position/tilt support (#496)
* Add climate support

* Fixes

* Updates

* Updates

* Add ota

* Remove climate changes

* Lint
2019-04-08 18:08:58 +02:00
Michiel van Turnhout
cb9f36a153 TTP229-LSF i2c device support (#489)
* setting up non i2c ttp229

* add component

* fixed const and multiconf

* fixed issues with i2c address (it is fixed for this device
renamed component and platform to ttp229_lsf => i2c device. There is
another ttp229_bsf device that uses a proprietary bus protocol

* max channels is 0 to 15

* folow up on code review

* fixed Component ttf229_lsf
2019-03-31 19:00:39 +02:00
Otto Winter
0272048899
Upgrade docker base image to 1.4.3 (#499) 2019-03-31 12:25:44 +02:00
Otto Winter
5b0d30bc09
Fix text sensor MQTT settings (#495)
Fixes https://github.com/esphome/issues/issues/170
2019-03-31 11:04:57 +02:00
Otto Winter
5859d4b01f
Fix dashboard wizard unicode (#494)
* Fix dashboard wizard unicode

Fixes https://github.com/esphome/issues/issues/169

* Fix password md5
2019-03-31 11:04:41 +02:00