Commit graph

695 commits

Author SHA1 Message Date
Otto Winter
7d4f279206
Web server CORS headers (#840)
* Add CORS header to web server

* Refactor

* Cleanup

See also https://github.com/esphome/issues/issues/806
2019-11-12 19:03:59 +01:00
Otto Winter
51233e1931
Fix sensor force_update native API (#847)
Fixes https://github.com/esphome/issues/issues/842
2019-11-12 19:01:36 +01:00
Otto Winter
907c14aa98
Fix neopixelbus missing method pins (#848)
Fixes https://github.com/esphome/issues/issues/839
2019-11-12 18:59:23 +01:00
Otto Winter
fb055750df
Add missing state attribute (#851)
* Add api missing_state attribute

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

Adds a new property for missing state, so that HA can now when a sensor does not have a state yet.

* Update api.proto
2019-11-12 18:58:26 +01:00
Otto Winter
fad05d5a2e
Add wifi output_power setting (#853)
* Add wifi output_power setting

See also:
 - https://github.com/esphome/feature-requests/issues/471#issuecomment-552350467
 - https://github.com/esp8266/Arduino/issues/6366
 - https://github.com/esp8266/Arduino/issues/6471
 - 849f8cf920/code/espurna/config/general.h (L593-L599)
 - https://docs.espressif.com/projects/esp-idf/en/latest/api-reference/network/esp_wifi.html#_CPPv425esp_wifi_set_max_tx_power6int8_t

* Lint
2019-11-12 17:39:27 +01:00
Guillermo Ruffino
9580b13b9f fix esphome better error out (#843)
* fix esphome better error out

* lint

* not in then
2019-11-12 15:28:23 +01:00
Guillermo Ruffino
367ae906c3
fix missing checks of is_playing condition (#844) 2019-11-11 23:50:06 -03:00
Nikolay Vasilchuk
f8d98ac494 http_request component (#719)
* It works

* Template doesn't work

* Template fix

* CA Certificate untested

* ESP32 done

* URL validation

* Lint fix

* Lint fix (2)

* Lint fix (<3)

* Support unsecure requests with framework >=2.5.0

* Removed fingerprint, payload renamed to body

* Removed add_extra

* Review

* Review

* New HTTP methods

* Check recommended version

* Removed dead code

* Small improvement

* Small improvement

* CONF_METHOD from const

* JSON support

* New JSON syntax

* Templatable headers

* verify_ssl param

* verify_ssl param (fix)

* Lint

* nolint

* JSON string_strict

* Two json syntax

* Lambda url fix validation

* CI fix

* CI fix
2019-11-09 18:37:52 +01:00
Alexander Leisentritt
3e8fd48dc0 implemented ruuvi_ble and ruuvitag with RAWv1 and RAWv2 protocol (#810)
* implemented ruuvi_ble and ruuvitag with RAWv1 protocol

fixes esphome/feature-requests#313

* lint

* updated data calculations

* cpp lint

* use string directly in message

Co-Authored-By: Otto Winter <otto@otto-winter.com>

* add RAWv2 protocol support

* fix ICON_SIGNAL

* typo

* calculation correction and cleaning

* c++ lint

* added acceleration and fixed typo

* removed remote_receiver to reduce firmware size

remote_receiver also in test1.yaml
2019-11-07 22:10:09 +01:00
Otto Winter
003326f2eb
Fix calculations for negative sun declination (#839)
Fixes https://github.com/esphome/issues/issues/793

Also adds a clampd function that operates with doubles, not floats
2019-11-06 22:49:38 +01:00
Otto Winter
b5af3aa048
Update variable in scheduler (#838)
Fixes https://github.com/esphome/issues/issues/826
2019-11-06 22:35:22 +01:00
Sergio
a919b015b4 Add support for INA226 Current/Power Monitor (#801)
* Add support for INA226 Current/Power Monitor

* fix lint errors

* fix narrowing conversion

* Remove useless code


Co-authored-by: Sergio Muñoz <sergio@iMac-de-Sergio.local>
2019-11-06 13:59:00 +01:00
DAVe3283
f94e9b6b1e Add MAX31865 sensor support, fix MAX31855 sensor (#832)
* Add MAX31865 sensor support, fix MAX31855 sensor.

# MAX31865

Added support for the MAX31865 RTD-to-Digital Converter to measure PT100 and
similar RTDs. Verified with an Adafruit unit (product ID: 3328) and a PT100
probe.

# MAX31855

This was setup for incorrect SPI clock polarity and phase, and would return bad
data due to a race condition measuring on the wrong edge (verified with Saleae
Logic scope). Selecting the correct configuration fixes that problem.

Re-wrote the decode off the datasheet to handle error states better (sends NaN
as an update on failure to read temperature, which shows the value as Unknown
in Home Assistant).

Added the *optional* ability to monitor the internal high-precision temperature
sensor, which can be nice in some applications.

* Tests for MAX31855/MAX38165.

* Update style to match project rules.

Also fix CONF_REFERENCE_RESISTANCE and CONF_REFERENCE_TEMPERATURE being defined
multiple places. Missed this when I added them to const.py.

* Update style to match project rules.

Pylint line limit 101/100 ("missed it by that much").
Also apparently I can't read and patched the wrong line in max31855.cpp.

* Minor string/style cleanup.

There was a copy-paste leftover in max31855.cpp and max31865/sensor.py had
unnecessary whitespace.

* Improve MAX31865 fault detection and logging.

Log levels are more in-line with the documented descriptions.

Fault detection code is improved. A transient fault between reads is still
reported, but now only faults *during* a read cause the sensor to fail and
return NAN ("unknown" in Home Assistant).

* Update style to match project rules.

I just now realized the .clang-format and pylintrc files are included. D'oh!

* MAX31855 & MAX31865 code style alignment.

@OttoWinter caught some style mismatches, updated to match project better.

* Fix a lost '\' in max31865/sensor.py.
2019-11-06 13:56:43 +01:00
Otto Winter
1ed8e63d59
Remove useless code
See also https://github.com/esphome/esphome/pull/801/files#r342813117
2019-11-05 22:45:31 +01:00
Otto Winter
d97bc95798
Update platformio libraries (#837)
* Update platformio libraries

* Lint
2019-11-05 22:28:19 +01:00
Otto Winter
5c56f15c67
Fix homeassistant.service schema lambda (#833)
* Fix homeassistant.service schema lambda

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

* Improve

* Fix
2019-11-05 22:27:35 +01:00
Otto Winter
3fdb68cba8
Fix ESP32 rotary encoder (#834)
* Fix ESP32 rotary encoder

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

* Update rotary_encoder.cpp

* Lint
2019-11-05 22:26:06 +01:00
Otto Winter
85c46becdf
WiFi AP apply manual ip settings (#836) 2019-11-05 22:11:15 +01:00
Otto Winter
0cbd373817
ESP8266 remove default opmode check (#835) 2019-11-05 21:56:35 +01:00
Otto Winter
8027facb39
Fix weird ESP8266 wifi crashes (#831)
* Try fix ESP8266 weird crashes

* Only call disconnect if STA is active
2019-11-03 00:19:57 +01:00
Otto Winter
16c2dc2aaf
Fix stack trace decode for latest platformio (#830) 2019-11-02 21:19:15 +01:00
Otto Winter
dc2279b74f
Add servo missing restore option to codegen (#829)
See also https://github.com/esphome/issues/issues/609
2019-11-02 20:56:42 +01:00
Otto Winter
75275c4e93
Remove PCF8574 input_pullup mode and cleanup (#828)
Fixes https://github.com/esphome/issues/issues/755
Closes https://github.com/esphome/esphome/pull/822
Fixes https://github.com/esphome/issues/issues/667
Closes https://github.com/esphome/esphome/pull/808

Co-Authored-By: Amish Vishwakarma <amishv@users.noreply.github.com>
Co-Authored-By: S-Przybylski <s-przybylski@users.noreply.github.com>
2019-11-02 20:31:39 +01:00
Otto Winter
65d3dc9cb8
Fix update-all input in dashboard (#826)
Fixes https://github.com/esphome/issues/issues/798
2019-11-02 19:35:55 +01:00
Otto Winter
66aa02fc34
Move native API enums to new namespace (#825)
Fixes https://github.com/esphome/issues/issues/801
2019-11-02 19:35:45 +01:00
Otto Winter
be6b4ee47f
Fix wizard mkdir (#824)
* Fix CLI wizard mkdir_p with empty path

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

* Cleanup

* Lint
2019-11-02 19:35:37 +01:00
Alexander Leisentritt
90f909d2ea refactored xiaomi ble data parsing (#823) 2019-11-02 18:55:10 +01:00
Otto Winter
adf2a463fd
Fix some binary_sensor not having an initial state (#819)
Fixes https://github.com/home-assistant/home-assistant/issues/28384
2019-10-31 21:03:57 +01:00
Otto Winter
80aaf66963
Fix fan oscillating (#818)
Fixes https://github.com/esphome/issues/issues/783
2019-10-31 20:31:58 +01:00
Otto Winter
560251ab2a
Scheduler fixes (#813)
* Scheduler fixes

Fixes https://github.com/esphome/issues/issues/789, fixes https://github.com/esphome/issues/issues/788

Also changes to use unique_ptr - this should be much safer than the raw pointers form before (though the scoping rules might cause some issues, but looking closely I didn't find anything)

* Disable debugging

* Format
2019-10-31 20:25:16 +01:00
Otto Winter
864c5d8908
Allow TimePeriod for time_period_str_unit (#815) 2019-10-31 20:09:57 +01:00
Otto Winter
742c21506c
Print update interval for pulse counter (#816) 2019-10-31 20:09:23 +01:00
Otto Winter
a6faccb4d9
Uppercase ESPHome (#814) 2019-10-31 20:09:07 +01:00
Lumpusz
69fd3e8937 service uuid based ble tracking (#800)
* service uuid based ble tracking

* code review fixes

* fix import, format

* fix indentation

* reformat
2019-10-31 15:34:19 +01:00
Nikolay Vasilchuk
41233d7f25 [Hotfix] Dashboard authentication on Py3 (#812)
* Fix

* Review fix

* Reverted first fix
2019-10-31 15:10:52 +01:00
Antoine GRÉA
07286d1d76 Add check if middle_text is too short (#811)
* Add check if middle_text is too short

* Use int division as suggested
2019-10-30 16:16:14 +01:00
Otto Winter
08148c5830
Fix web server transition length truncated (#807)
Fixes https://github.com/esphome/issues/issues/772
2019-10-27 12:30:48 +01:00
Otto Winter
969bdb06ce
Fix modbus register (#806)
Fixes https://github.com/esphome/feature-requests/issues/49#issuecomment-546555289

Co-Authored-By: tsunglung <tsunglung@users.noreply.github.com>
2019-10-27 12:30:36 +01:00
Otto Winter
b0bb692af4
AS3935 Use normal pin polling for IRQ (#805)
* AS3935 Use normal pin polling for IRQ

See also https://github.com/esphome/feature-requests/issues/452

* Fix tests
2019-10-27 12:30:19 +01:00
Otto Winter
7bf6fd316f
Add Tuya message for no datapoints (#804)
See also https://github.com/esphome/feature-requests/issues/352#issuecomment-546579206
2019-10-27 12:28:01 +01:00
Otto Winter
c1f5e04d6c
Warn when UART and logger operating on same bus (#803) 2019-10-27 12:27:46 +01:00
John
5a67e72389 Added more power data to the atm90e32 component (#799)
* Added more data to atm90e32 component

* ignore

* correction

* Delete 6chan_energy_meter.yaml

* Update sensor.py

fixed indents

* Update atm90e32.h

* Update esphome/components/atm90e32/sensor.py

Co-Authored-By: Otto Winter <otto@otto-winter.com>

* PR request changes

* repository test branch

* Update setup.py

* Update const.py

* backslash

* comma!

* delete test yaml

* corrected chip temp

* change to signed int for get_pf_ functions

* Update atm90e32.h

formatting

* adjusted function & variable names

* Update atm90e32.h

formatting

* Update sensor.py

Import CONF_POWER_FACTOR from const.py

* travis formatting

* Update esphome/components/atm90e32/sensor.py

Co-Authored-By: Otto Winter <otto@otto-winter.com>

* Update esphome/components/atm90e32/atm90e32.h

Co-Authored-By: Otto Winter <otto@otto-winter.com>
2019-10-27 12:05:13 +01:00
Pavel Golovin
91c9b11647 Fujitsu General climate new component (#677)
* new Fujitsu-General climate component

* Refactor out climate_ir

CC @glmnet

Refactored out climate_ir python files too.
Fixed invalid namespace name for climate_ir.

* Add namespace lint check

* Refactor Fujitsu Climate to climate_ir


Co-authored-by: Otto Winter <otto@otto-winter.com>
2019-10-25 11:32:31 +02:00
Otto Winter
bb2582717f
Make file generation saving atomic (#792)
* Make file generation saving atomic

* Lint

* Python 2 Compat

* Fix

* Handle file not found error
2019-10-24 21:53:42 +02:00
Otto Winter
d62ef35860
Fix scheduler first execution (#798)
* Fix scheduler first execution not immediately

* Also update sensor filters
2019-10-24 21:24:57 +02:00
Otto Winter
59c5956f93
Fix MQTT not showing logs with Python 3 (#797)
* Fix MQTT logging for Python 3

* Also fix captive portal PACKED
2019-10-24 20:11:17 +02:00
Nikolay Vasilchuk
e4f055597c Logger on_message trigger (#729)
* on_message

* Lint fix

* Lint fix (2)

* Lint fix (<3)

* Replace cg.int_ with int

* Revert

* Removed strdup


Co-authored-by: Otto Winter <otto@otto-winter.com>
2019-10-24 14:19:33 +02:00
Chris Debenham
4c49beb3c7 Add missing include - fixes missing GPIOPin definition (#794) 2019-10-24 14:13:50 +02:00
Otto Winter
8ff742d9ab
Implement more dump_configs (#791) 2019-10-23 14:43:41 +02:00
Otto Winter
d63cd8b4cd
Add additional custom lint checks (#790) 2019-10-23 14:43:27 +02:00
Otto Winter
3f0503c296
Fix modbus CRC calculation (#789)
* Fix modbus CRC calculation

Fixes https://github.com/esphome/feature-requests/issues/49#issuecomment-545045776

* Fix
2019-10-22 22:56:34 +02:00
Otto Winter
c18050bda0
Add Python 2 deprecation notice (#784)
* Add Python 2 deprecation notice

* Update __main__.py
2019-10-21 23:32:12 +02:00
Ville Skyttä
6542be5588 Wizard board name fixes (#787)
* Sort board names in wizard

* Fix board name in invalid board error message
2019-10-21 23:06:11 +02:00
Nils Schulte
9fb60b8015 web_server_base AUTO_LOAD includes ASYNC_TCP (#788)
* web_server_base AUTO_LOAD includes ASYNC_TCP

fix AUTO_LOAD of web_server_base to include ASYNC_TCP

* Remove from dependencies


Co-authored-by: Otto Winter <otto@otto-winter.com>
2019-10-21 23:05:50 +02:00
Otto Winter
1177b856a0
Fix ledc can't find bit_depth (#786)
Fixes https://github.com/esphome/issues/issues/759
2019-10-21 22:55:27 +02:00
Otto Winter
ae8700447e
Add sensor force_update option (#783)
* Add sensor force_update option

* Add test
2019-10-21 15:46:39 +02:00
amishv
d64a4ef2b4 Implementation of LCD Clear (#781)
* Implementation of LCD Clear

* Implementation of LCD Clear

* Implementation of LCD Clear

* Implementation of LCD Clear
2019-10-21 12:43:28 +02:00
Otto Winter
1e22b1e959
Update AsyncMQTTClient/ESPAsyncWebServer (#779) 2019-10-20 19:24:34 +02:00
Otto Winter
e077ad56bd
Add PZEM004T/PZEMAC/PZEMDC Support (#587)
* Add PZEM004T Support

* Don't flush as much

* Update pzem004t.cpp

* Add generalized modbus

* Add PZEMAC

* Add PZEMDC

* Fix file modes

* Lint

* Fix

* Fix

* Add check_uart_settings
2019-10-20 19:24:20 +02:00
Otto Winter
f1e00f8c8e
Add GPIO Switch interlock wait time (#777)
* Add interlock wait time to gpio switch

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

* Format

* Fix
2019-10-20 18:10:14 +02:00
Otto Winter
9a152e588e
Vl53l0x (#644)
* VL530LX

* VL53L0X

* Updates

* License

* Lint
2019-10-20 17:56:57 +02:00
Otto Winter
16f42a3d03
Add script.wait action (#778)
Fixes https://github.com/esphome/feature-requests/issues/416, fixes https://github.com/esphome/issues/issues/572
2019-10-20 16:15:30 +02:00
Otto Winter
6c8d0f1852
Change message 2019-10-20 15:57:59 +02:00
Otto Winter
b59cf6572b
Add lint check for integer constants (#775) 2019-10-19 22:31:32 +02:00
Otto Winter
4fa11dfa68
Lint 2019-10-19 21:59:55 +02:00
Otto Winter
352bdd9fb5
Tuya Set gamma correction and transition length defaults
See also https://github.com/esphome/esphome-docs/pull/353/files#r336751499
2019-10-19 21:50:39 +02:00
Samuel Sieb
96ff9a162c Add new component for Tuya dimmers (#743)
* Add new component for Tuya dimmers

* Update code

* Class naming

* Log output

* Fixes

* Lint

* Format

* Fix test

* log setting datapoint values

* remove in_setup_ and fix datapoint handling


Co-authored-by: Samuel Sieb <samuel@sieb.net>
Co-authored-by: Otto Winter <otto@otto-winter.com>
2019-10-19 21:47:24 +02:00
Guillermo Ruffino
af15a4e710 Add dfplayer mini component (#655)
* Add dfplayer mini component

* receiving some data

* implemented many actions

* lint

* undo homeassistant_time.h

* Update esphome/components/dfplayer/__init__.py

Co-Authored-By: Otto Winter <otto@otto-winter.com>

* Update esphome/components/dfplayer/dfplayer.cpp

Co-Authored-By: Otto Winter <otto@otto-winter.com>

* add set device. fixes

* lint

* Fixes and sync with docs

* add test

* lint

* lint

* lint
2019-10-19 21:37:05 +02:00
Nad
18426b71e4 Add support for STS3x Temperature sensors (#669)
* Add support for Sensirion STS3x Temperature sensors

* Removed humidty reading from STS3x sensor

* Fixed line error and operand error

* Fixed syntax

* Add test snippet for STS3x sensor

* Clean up

* #550 Proactive fix for STS3x component reporting WARNING status and reinitialzing similar to SHT3xd

* Flattened config.

* Fixed missing temperature unit

* Code formatting

* Added marking for future commands

* Cleanup

* Removed whitespace

* Cleanup

* Cleanup
2019-10-19 21:31:37 +02:00
Nad
7063aa6009 Add support for SHTCx Temperature sensors (#676)
* Add support for Sensirion STS3x Temperature sensors

* Removed humidty reading from STS3x sensor

* Fixed line error and operand error

* Fixed syntax

* Add test snippet for STS3x sensor

* Clean up

* Add support for Sensirion SHTC1 and SHTC3 Temperature sensors

* Fixed the test

* Fix lint issues

* Update esphome/components/shtcx/shtcx.cpp

Good point.

Co-Authored-By: Otto Winter <otto@otto-winter.com>

* Refactored device type identification and logging

* Refactoring and cleanup

* Remove sts3x


Co-authored-by: Otto Winter <otto@otto-winter.com>
2019-10-19 21:31:27 +02:00
Nad
286ca07cc8 Add support for SGP30 eCO2 and TVOC sensors (#679)
* Add support for SGP30 eCO2 and TVOC sensors

* Added test for SGP30

* Lint issues fixed

* Lint fixes

* Fixed light lengths

* Cleanup

* Add support for Sensirion SCD30 CO2 sensors

* Fixed few lint issues

* Lint fixes

* Fixed line ending for lint

* Cleanup

* Refactored float conversion

* Refactor unnecessary return

* Refactoring and cleanup

* Updated uptime_sensor_ referencing and simplified checking on availability of copensation

* Temperature and Humidity source moved to a separate compensation block; Dependency for Uptime sensor removed.

* Both humidity_source and temperature_source are now mandatory if the compensation block is defined;

* Clean up

* Cleanup

* Cleanup in search of perfection

* Use correct comment style


Co-authored-by: Otto Winter <otto@otto-winter.com>
2019-10-19 21:21:07 +02:00
Evan Coleman
58b6311821 Add SSD1325 Display Component (#736)
* add ssd1325 component

* fix i2c

* remove ssd1325 i2c

* add test

* set max contrast

* No macros - see styleguide

* Remove invalid function

* Formatting


Co-authored-by: Otto Winter <otto@otto-winter.com>
2019-10-19 20:44:43 +02:00
Otto Winter
62d4b29662
Format 2019-10-19 17:48:30 +02:00
Otto Winter
16bc60644d
Bump version to v1.15.0-dev 2019-10-19 17:11:22 +02:00
Otto Winter
28031cfa3e
Add to ignore list 2019-10-19 16:17:20 +02:00
Otto Winter
292c2d0c53
Remove debug log from dashboard js 2019-10-19 16:17:12 +02:00
Otto Winter
869775ec7a
Fix compile warning in SCD30 2019-10-19 16:17:01 +02:00
Otto Winter
783b179af7
Fix TinyGPSPlus having name conflict 2019-10-19 16:16:49 +02:00
Otto Winter
28454ea4cd
Fix dashboard setup for python 3 2019-10-19 15:48:57 +02:00
Otto Winter
9f4b666ef0
ESP32 Upgrade AsyncTCP to 1.1.1 (#773) 2019-10-19 14:15:22 +02:00
Otto Winter
80214640b1
Filter some debug lines from PlatformIO in output (#771)
* Filter some debug lines from PlatformIO in output

* Lint

* Strip trailing newline from esp-idf output

* Only create global std::string if on esp32
2019-10-19 14:04:14 +02:00
Otto Winter
4310c14497
Add BLE scan parameters (#769)
* Add BLE parameters

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

* Fix
2019-10-18 18:15:53 +02:00
Otto Winter
aebb6d2fcc
Revert "Fix filter_out bug"
This reverts commit 1ade7bcb2d.
2019-10-18 17:30:44 +02:00
Otto Winter
af35c9258e
Py3 Updates 2019-10-18 16:58:29 +02:00
Fabian Affolter
7a43231c43 Support for Python 3 (#702)
* Support for Python 3

* Add later Python releases

* Remove Python 3.6

* Re-enable Python 2.7

* Remove platformio-core zip archive

* Re-enable Python 2.7

* Fixes for python 3

Co-Authored-By: C W <fake-name@users.noreply.github.com>
2019-10-18 16:51:16 +02:00
Otto Winter
1bf55c130b
Format 2019-10-18 16:43:37 +02:00
Otto Winter
95a74a7f19
Addressable light transition (#750)
* Improve addressable light transition behavior

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

* Improve addressable flicker effect

See also https://github.com/esphome/feature-requests/issues/348

* Update addressable_light_effect.h

* Refactor

* Format

* Prevent divide by zero

* Fixes
2019-10-18 16:27:36 +02:00
Otto Winter
b78b28ea0e
Fix platformio monkey patch (#768) 2019-10-18 15:33:30 +02:00
Otto Winter
aed7b3fbb2
Fix typo in Component::set_interval (#767)
Ouch...
2019-10-18 15:33:18 +02:00
Otto Winter
1ade7bcb2d
Fix filter_out bug 2019-10-18 14:58:06 +02:00
Otto Winter
21bbafb63d
Captive portal fixes (#766)
* Enable MDNS logs comment

* Work around ESP8266 mDNS broken for AP

See also https://github.com/esp8266/Arduino/issues/6114

* Enable captive_portal in AP-only mode

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

* Make ESP32 connecting faster

See also https://github.com/espressif/arduino-esp32/pull/2989

* Format
2019-10-18 14:46:44 +02:00
Otto Winter
1cfc6ac3c6
Update ESP8266/ESP32 bases (#760)
* Update ESP8266/ESP32 bases

* Update platformio.ini

* Update boards definitions
2019-10-18 14:46:29 +02:00
Otto Winter
c3aa834d80
Fork some base libraries (#758)
* Fork some base libraries

* Update ESPAsyncWebServer
2019-10-18 14:46:09 +02:00
Otto Winter
68d0d045c0
Add LEDC set_frequency action (#754)
* Add LEDC set_frequency

Fixes https://github.com/esphome/feature-requests/issues/380

* Fix log

* Fixes

* Format

* Update test1.yaml

* Update test1.yaml

* Fix
2019-10-18 11:22:08 +02:00
Marcel van der Veldt
72d6471ab8 add support for climate action (#720)
* add support for climate action:

Following hass implementation of climate, action represents the current action the climate device is perfoming, e.g. cooling or heating

fix bang_bang climate:

make sure that the thresholds are always respected.
fixes the issue where the component would just keep on heating, regardless of the temperature range

* Updates

- Use dedicated enum for action (otherwise it gets confusing because "auto" is not a valid action)
- Add field to tell HA that action is supported
- Revert semantic changes in bang_bang

* Conditional print


Co-authored-by: Otto Winter <otto@otto-winter.com>
2019-10-18 10:39:14 +02:00
Otto Winter
22aecdfc6f
Use higher default baudrate for USB upload (#761)
See also https://github.com/espressif/esptool/issues/435
2019-10-18 10:23:06 +02:00
Otto Winter
ee0b6e835f
Sensor filter_out rounded (#765)
Fixes https://github.com/esphome/issues/issues/741
2019-10-18 10:22:29 +02:00
Guillermo Ruffino
8292024306 add tcl112 receiver (#762) 2019-10-18 09:22:55 +02:00
Guillermo Ruffino
84cfcf2b4a vscode support check file exists (#763)
* vscode support check file exists

* ups. formatter got disabled
2019-10-18 09:17:16 +02:00
nicuh
ea762b7295 Fix remote_transmitter type_a encoding (#742)
Co-authored-by: Nicu Hodos <nicu@hodos.ro>
2019-10-18 09:05:37 +02:00
Nikolay Vasilchuk
d51c0f13c0 SenseAir S8 CO2 sensor support (#705)
* Компилится

* Tests

* Checksum calculation

* Read status
2019-10-17 21:37:24 +02:00
Otto Winter
6ceb975a3a
calibrate_linear check not all from values same (#714)
Fixes https://github.com/esphome/issues/issues/524
2019-10-17 21:35:59 +02:00
Otto Winter
9a40d6ef50
Integration sensor use double precision (#715)
Fixes https://github.com/esphome/issues/issues/534

Kept the RTC value as a float in order not to introduce a breaking preferences change.
2019-10-17 21:35:31 +02:00
Otto Winter
32195f77d9
Fix dallas not unknown (#716)
* Fix dallas not sending unknown on disconnected sensor

* Deep sleep
2019-10-17 21:34:58 +02:00
Guillermo Ruffino
578e5a0d7a Base climate ir (#726)
* add ClimateIR

* update climate ir

* update class comment

* lint

* moved to climate_ir

* fix include path

* use climateir

* updates

* update include path

* lint

* fixed variable assigned to itself
2019-10-17 21:01:02 +02:00
Lazar Obradovic
1242f43769 BME280: Increase sensor timeout (#727)
I'm facing some occasional timeouts when reading BME280. 
Looking at Adafruit driver (that this code is based on), I see that base math is using 1.25ms, increased by 2.3*oversampliing + 0.575 for each value being read. 
I've added 1.5ms as baseline, to be on the same safe.
2019-10-17 20:58:59 +02:00
Thomas Klingbeil
3bb6430495 Add support for TTGO ePaper module (#730)
* Add support for TTGO ePaper module

Use 2.13in-ttgo as type. Only different LUTs were needed, everything else is the same.

relates to issue #233.

* fix styling errors

* styling fixes


Co-authored-by: null <mandy.klingbeil@student.hpi.uni-potsdam.de>
2019-10-17 20:55:27 +02:00
Otto Winter
aae633277f
Fix strobe/flicker effect not using selected value (#749)
Fixes https://github.com/esphome/issues/issues/562
2019-10-17 19:15:02 +02:00
Otto Winter
996c50e8f2
Add rotary_encoder.set_value action (#747)
* Add rotary_encoder.set_value action

Fixes https://github.com/esphome/feature-requests/issues/389

* Fix
2019-10-17 19:14:52 +02:00
Otto Winter
95c883ae9b
Fix MCP23017 setup priority (#751)
Fixes https://github.com/esphome/issues/issues/535
2019-10-17 19:14:25 +02:00
Otto Winter
78c1adafcd
Make UART flush function consistent (#748)
See also 78be9d2937
2019-10-17 16:54:38 +02:00
Otto Winter
e15071228e
Fix addressable light fade to black function (#752)
Fixes https://github.com/esphome/issues/issues/517
2019-10-17 16:53:55 +02:00
Otto Winter
ac48ff1fd6
Fix potential ISR digital_write issue (#753) 2019-10-17 16:53:39 +02:00
Guillermo Ruffino
428684bc1e Brightness ssd1306 (#723)
* added brightness for oled display ssd1306

* lint


Co-authored-by: waiet <vlado.rusnak23@gmail.com>
2019-10-17 16:36:11 +02:00
TomFahey
81b7653c9c Add mcp23008 support (#649)
* Add support for mcp23008 8-port io expander

* add-mcp23008-support

* Revert "add-mcp23008-support"

This reverts commit b4bc7785b1.

* Fixed spacing typo

* removed extra space in mcp23008.cpp, line 23

* Fixed trailing whitespace issue

* Added mcp23008 component

* Added component mcp23008

* Edited typo in test/test1.ymal

Removed additional ' in line 1337

* Another typo
2019-10-17 16:18:41 +02:00
Alexander Leisentritt
45736707bd fix CGG1 log message (#757) 2019-10-17 14:02:41 +02:00
Alexander Leisentritt
cdfbe5b523 refactored xiaomi sensors (#755)
* refactored xiaomi sensors

* fix lint

* fixed and added tests

* fix namespace

* LYWSD02 has no battery level

* fixed enum

* fix

* fix case

* fix spaces in empty line...

* inform users of old sensors about the change
2019-10-16 13:29:56 +02:00
Otto Winter
cdb9c59662
Add ADE7953 Support (#593)
* Add ADE795 support

* Lint

* Fix

* Fix, add test
2019-10-16 13:19:41 +02:00
amishv
9c30f4cc68 Fix for PCF8574 output chattering at the start/reboot (#744)
* Fix for PCF8574 output chattering at the start/reboot

* Fix for PCF8574 output chattering at the start/reboot

* Fix for PCF8574 output chattering at the start/reboot


Co-authored-by: Amish Vishwakarma <vishwakarma.amish@gmai.com>
2019-10-15 21:31:52 +02:00
Otto Winter
23f99908db
Apply HDC1080 patch from @Hsxsky
See also 105ac63d62
2019-10-15 20:53:59 +02:00
Sergio Mayoral Martínez
e30512931b Add Xiaomi Cleargrass Temperature and Humidity Sensor (#735)
* Add Xiaomi Cleargrass Temperature and Humidity Sensor

* fix CI Travis

* fix CI Travis 2

* Improve device detection (more accurate)


Co-authored-by: t151602 <sergio.mayoralmartinez@telefonica.com>
2019-10-14 13:25:08 +02:00
Otto Winter
e207c6ad84
Fix ct_clamp update
Fixes https://github.com/esphome/issues/issues/684
2019-10-14 12:06:23 +02:00
Levente Tamas
9d7f76773d Add support for TI TLC59208F (#718)
* Add support for TI TLC59208F

The chip is a 8-BIT FM+ I2C BUS LED DRIVER with
8 open-drain output channels.

Its features include:
- 256 linear levels
- group dimming
- group blinking
- 64 slave addresses
- customizable sub addresses and all call address
- output update on stop or on ACK
- 3.3V or 5V supply with 5V tolerant IO
- no glitch startup
- 50mA / output continuous current up to 17V

* Convert macro to uint8_t

Variables had to be renamed, clang-format would protest against
mixed case in global variable name.

* Change gen-call reset to use the correct i2c bus
2019-10-14 11:30:41 +02:00
Michiel van Turnhout
5f2808ec2f support for the sx1509 i2c device (#651)
* added ANALOG_OUTPUT as first functionality

* added gpio

* seperated the code for different functions

* fixed code

* Revert "fixed code"

This reverts commit 0c6eacb225.

* add timings for breathe and blink

* made the sx1509_float_output am output component

* add keypad

* implementation for sx1509 keypad

* keypad code cleanup and first device tests

* debounce

* keypad working now.

* update for timings.
does not compile yet

* added all options for breathe and blink
fixed var namings

* blink and breath still not ok

* fixed ms for timings

* sync with repo

* fixed issue with gpio pin output

* code cleanup

* lint

* more lint

* remove log from header

* Update esphome/components/sx1509/__init__.py

Co-Authored-By: Otto Winter <otto@otto-winter.com>

* review

* feedback

* fixed review issues
did some extended testing with mqtt spy

* code cleanup (comments)

* fixed row col swap for binarysensor_keypad

* flake and lint

* travis

* travis

* travis

* Update esphome/components/sx1509/sx1509.cpp

Co-Authored-By: Otto Winter <otto@otto-winter.com>

* review

* separated platforms

* code cleanup

* travis relative paths in python

* remove blink/breathe
code cleanup

* cpp lint

* feedback

* travis

* lint line to long

* check keypad settings to be valid

* clang

* keypad config

* text

* Remove wrong .gitignore from .gitignore

* Remove .pio folder from .gitignore (merge)

* Formatting

* Formatting

* Add i2c log in dump_config

* Remove unused variables

* Disable static for header files

We don't need internal linkage

* Use consistent member default argument style

* Run clang-format


Co-authored-by: null <m.vanturnhout@exxellence.nl>
Co-authored-by: Otto Winter <otto@otto-winter.com>
2019-10-14 11:27:50 +02:00
Nikolay Vasilchuk
be91cfb261 Device description in dashboard (#707)
* Description

* Review fixes

* Test

* Label

* Description renamed to comment
2019-10-14 11:27:07 +02:00
Nad
0eadda77b0 Improve SHT3xD reconnect handling (#675)
* Add support for Sensirion STS3x Temperature sensors

* Removed humidty reading from STS3x sensor

* Fixed line error and operand error

* Fixed syntax

* Add test snippet for STS3x sensor

* Clean up

* #550 Fix STH3x component reporting WARNING status and reinitialzing the sensor upon reconnecting.

* #550 Fix lint issues

* Delete __init__.py

* Delete sensor.py

* Delete sts3x.cpp

* Delete sts3x.h

* Delete test1.yaml

* Revert "Delete test1.yaml"

This reverts commit 33e69fb703.

* Removed leaked STS3x changes from test
2019-10-13 17:46:21 +02:00
Nikolay Vasilchuk
b2388b6fe7 Basic Auth for web_server component (#674)
* Basic auth

* Test

* Linter fix

* Make username/password strict strings

Reason: passwords only consisting of digits (012345) will be silently converted (to "12345")


Co-authored-by: Otto Winter <otto@otto-winter.com>
2019-10-13 14:27:44 +02:00
Nikolay Vasilchuk
1a763ae974 Authorization by username and password (#668)
* Auth

* Logout

* Lint fix

* Small hassio fix

* Reverted uppercase

* Secrets editor

* Reverted secrets editor

* Reverted log height

* Fix default username
2019-10-13 13:52:02 +02:00
Otto Winter
38dfab11b4
Fix dev branch 2019-10-13 13:51:34 +02:00
Nikolay Vasilchuk
7c31592850 Secrets editor (#672)
* Secrets editor

* Check file exists
2019-10-13 12:57:28 +02:00
Nikolay Vasilchuk
57bee74225 Fill log height (#673) 2019-10-13 12:55:26 +02:00
Otto Winter
fa351cd37c
Cleanup AS3935 2019-10-12 17:03:01 +02:00
Thomas Eckerstorfer
68e7e5a51c AS3935 Lightning sensor (#666)
* added tx20 wind speed sensor

* added test

* fixed lint errors

* fixed more lint errors

* updated tx20

* updated tx20 sensor

* updated to new structure and removed static variables

* removed content from __init__.py

* fixing lint errors

* resolved issues from review

* added as3935 sensor

* updated as3935 with more settings

* update

* support for i2c + spi updated

* added tests and various fixes

* added tx20 wind speed sensor

* fixed lint errors

* fixed more lint errors

* updated tx20

* updated tx20 sensor

* updated to new structure and removed static variables

* removed content from __init__.py

* fixing lint errors

* resolved issues from review

* added as3935 sensor

* updated as3935 with more settings

* update

* support for i2c + spi updated

* added tests and various fixes

* updated tests

* fixed style issues

* Remove debug line

* Update log levels

* Reformat

* Auto-convert to int


Co-authored-by: Thomas <thomas.eckerstorfer@mic-cust.com>
Co-authored-by: Otto Winter <otto@otto-winter.com>
2019-10-12 15:03:35 +02:00
Abílio Costa
4d31ad3bdc Allow 64 bit codes and add nexa remote support. (#662)
* add nexa remote support.

This is inspired by: https://github.com/sui77/rc-switch/pull/124
As described there: "The remotes sold in ClasOhlson in scandinavia have
a slightly longer sync sequence(added a skip pulse field in the
protocol) and a 64 bit code word. Part of the code gets lost but that
seems to be OK until support for 64 bit codes is added."

* add default value to ctor

* allow 64bit codes

* lint

* make vars 64 bits
2019-10-12 14:42:27 +02:00
Guillermo Ruffino
f4f1164b94
fixes samsung ir (#738)
fixes https://github.com/esphome/issues/issues/691
2019-09-28 10:26:48 -03:00
C W
bd0be41064 Fix https://github.com/esphome/issues/issues/658 (#724)
* Fix https://github.com/esphome/issues/issues/658

* Update to gross code style.
2019-09-10 23:37:33 -03:00
Guillermo Ruffino
4118a289a6
Add coolix receiver (#645)
* add coolix receiver

a

* lint - added comments

* Lint

* target temp neve be nan
2019-09-08 22:14:39 -03:00
Fritz Mueller
1d5f8d5a52 Use default format to render FloatLiteral (#717)
Fixes https://github.com/esphome/issues/issues/557
2019-09-04 11:06:18 +02:00
Otto Winter
fd1dc24ac6
Also accept invalid spelling from Updater
Fixes https://github.com/esphome/issues/issues/564 partly.

At least the error message will now be a better one.
2019-09-01 11:42:37 +02:00
Otto Winter
be1e4c0a1d
Fix nextion display_picture argument order
Fixes https://github.com/esphome/issues/issues/613
2019-08-31 21:14:33 +02:00
Otto Winter
c2028f7378
DHT publish NAN on invalid reading
Fixes https://github.com/esphome/issues/issues/590
2019-08-31 21:14:10 +02:00
Otto Winter
4b0f203049
Use unique enum names for native API
Fixes https://github.com/esphome/issues/issues/617
2019-08-31 21:13:41 +02:00
Otto Winter
23ff8178a0
Merge branch 'dev' of https://github.com/esphome/esphome into dev 2019-08-31 20:23:35 +02:00
Otto Winter
93cfee8026
Fix strobe effect
Fixes https://github.com/esphome/issues/issues/620
2019-08-31 20:23:06 +02:00
Guillermo Ruffino
b6920025b2 Fixes sim800l (#678)
* Fix receive message quickly

* fix case

* lint
2019-08-31 19:45:34 +02:00
Otto Winter
fb29ac27a2
Merge branch 'dev' of https://github.com/esphome/esphome into dev 2019-08-31 19:24:53 +02:00
Nad
4c03cebef3 Add support for Sensirion SCD30 CO2 sensors (#712)
* Add support for Sensirion SCD30 CO2 sensors

* Fixed few lint issues

* Lint fixes

* Fixed line ending for lint

* Cleanup

* Refactored float conversion

* Refactor unnecessary return


Co-authored-by: Otto Winter <otto@otto-winter.com>
2019-08-31 19:24:37 +02:00
Guillermo Ruffino
244c4be8cc fix integration sensor (#711)
* fix integration sensor

* revert rtc_.save conditional
2019-08-31 18:45:06 +02:00
Guillermo Ruffino
9b28c732c6
fix wifi info (#709)
* fix wifi info

* lint time based cover
2019-08-29 21:34:29 -03:00
Otto Winter
5dfb33ebee
Merge branch 'dev' of https://github.com/esphome/esphome into dev 2019-08-29 16:20:59 +02:00
Otto Winter
2b30cde125
Fixup dev branch again
Closes https://github.com/esphome/esphome/pull/706
2019-08-29 16:20:56 +02:00
Robert Kiss
f9b3e61c0f Add delayed_on_off binary_sensor filter (#700)
* add delayed_on_off binary_sensor filter

* fix formatting

* remove unwanted file modification

* add newline to fix linter error
2019-08-29 16:09:37 +02:00
Guillermo Ruffino
83a92f03fc add time based cover, has built in endstop (#665)
* add has built in endstop

* rewrite as proposed

* Update esphome/components/time_based/time_based_cover.h

Co-Authored-By: Otto Winter <otto@otto-winter.com>

* lint

* Re trigger stop_operation if stop called

* allow se triggering open/close command if safe

* using COVER_OPEN/CLOSE constants
2019-08-29 16:07:41 +02:00
Nikolay Vasilchuk
d27291b997 License for Material Design Icons (#708) 2019-08-29 15:42:31 +02:00
Otto Winter
2c995cf145
Fix GPS time source. (#704)
* Change ESP32 default power_save_mode to light

* Update
2019-08-27 22:11:50 +02:00
Otto Winter
2822fa4a40
Also scan for symlinks in comports
Fixes https://github.com/esphome/feature-requests/issues/56
2019-08-27 22:10:23 +02:00
Otto Winter
ccf3da2a5a
Improve handling of no upload option
Fixes https://github.com/esphome/issues/issues/596
2019-08-27 22:00:34 +02:00
Otto Winter
5348b36a7c
Fix warnings about comments in lambdas
Fixes https://github.com/esphome/issues/issues/593
2019-08-27 21:51:59 +02:00
Otto Winter
947a6034e3
Update platformio patch for latest change
See also 8059e04499
2019-08-27 21:33:01 +02:00
junnikokuki
65d08beaa4 add xiaomi BLE Thermometer lywsd02 model support (#664)
* add xiaomi BLE Thermometer lywsd02 model support

* remove battery level

* Update sensor.py

to pass the lint test
https://github.com/esphome/esphome/pull/664

* fix trailing space


Co-authored-by: Guoxue <gx@m15.cn>
Co-authored-by: mr G1K <mr@g1k.ru>
2019-08-27 21:06:39 +02:00
Otto Winter
9770bc371b
Remove duplicate TAG value 2019-08-27 20:27:56 +02:00
Otto Winter
22f9f75914
Remove ESP32 uart pin entries
See also 655327a8b1
2019-08-27 20:13:50 +02:00
Otto Winter
54c9dd4173
Fix WiFi Info dump_config change
Fixes https://github.com/esphome/esphome/pull/698#discussion_r318212018
2019-08-27 20:07:48 +02:00
Jasper van der Neut - Stulen
0fc267dfc7 Implement median filter (#697)
Add median filter to sensors component
2019-08-27 10:39:04 -07:00
Nikolay Vasilchuk
c5db457700 MH-Z19 calibration support (#683)
* Allow configuration to enable or disable automatic baseline calibration on boot
* Add actions to enable or disable automatic baseline calibration
* Add action to calibrate zero point
2019-08-27 10:33:25 -07:00
Pauline Middelink
15a7d2ef75 The display component should not be handling update_interval, (#693)
as that is already done when registering the component.
2019-08-27 10:30:13 -07:00
Pauline Middelink
071272a27f Fix mqtt_text_sensor to honor unique_id when set. (#698)
* Fix mqtt_text_sensor to honor unique_id when set.
* Remove setting of unique_id in json tree, as the mqtt_component already does this, and in fact overrides what we do here.
* Add unqiue_id() and dump_config() to the wifi_info sensors.
2019-08-27 10:28:50 -07:00
Jack Wozny
655327a8b1 Corrected ESP32 hardware UART pins (#701)
The UART pins for Serial1 and Serial2 on the ESP32 were reversed.
2019-08-27 10:19:55 -07:00
Nikolay Vasilchuk
15b87af8ed Local Material Icons (#703)
Remove external dependence on fonts.googleapis.com by vendoring MDI fonts and CSS.
2019-08-27 10:10:44 -07:00
Brandon Davidson
a0b3d861fe
Remove double publish_state in ultrasonic sensor (#696)
Fixes https://github.com/esphome/issues/issues/589
2019-08-19 12:13:48 -07:00
Alex Mekkering
718c494013 Support voluptuous 0.11.7 / fix cpp-lint
* Support voluptuous 0.11.7 ( Fixes esphome/issues#580 )
* Fix travis target Cpp-Lint for platformio 4
2019-08-19 11:37:17 -07:00
Guillermo Ruffino
5c9755ecc1 fix missing schedule call (#690) 2019-08-11 12:30:47 +02:00
Otto Winter
11e88019c2
Fix travis 2019-07-28 15:40:31 +02:00
Felix Eckhofer
a783637a7a Restore sending "None" effect type (#667)
This is a regression from 369d175694.
2019-07-21 13:11:34 +02:00
Otto Winter
7210ad7ed9
Change ESP32 default power_save_mode to light (#661) 2019-07-03 20:42:55 +02:00
Otto Winter
1876c21e3e
WiFi networks priority (#658)
* WiFi networks priority

Fixes https://github.com/esphome/feature-requests/issues/136

* Print priority
2019-07-03 20:42:46 +02:00
Otto Winter
6516a6ff7e
Fix LG nbits 2019-07-03 17:16:46 +02:00
Otto Winter
85195436c1
Work around pytz tzname bug
Fixes https://github.com/esphome/issues/issues/445
2019-07-03 17:13:40 +02:00
Thomas Eckerstorfer
c6512013bb added tx20 wind speed sensor (#275)
* added tx20 wind speed sensor

* added test

* fixed lint errors

* fixed more lint errors

* updated tx20

* updated tx20 sensor

* updated to new structure and removed static variables

* removed content from __init__.py

* fixing lint errors

* resolved issues from review


Co-authored-by: Thomas <thomas.eckerstorfer@mic-cust.com>
Co-authored-by: Otto Winter <otto@otto-winter.com>
2019-07-03 16:42:32 +02:00
Otto Winter
81a070d03d
ESP32 Use NVS directly (#659) 2019-07-03 16:34:40 +02:00
Otto Winter
0ef1d178d2
Fix deep sleep on_shutdown hooks (#660)
Fixes https://github.com/esphome/feature-requests/issues/294
2019-07-03 16:34:03 +02:00
Nikolay Vasilchuk
762f1b1fc9 ZyAura CO2 / Temperature / Humidity Sensor (#656)
* ZyAura sensors support

* Validation

* Small refactoring

* Some checks

* Small fix

* Use floats, not double

Co-Authored-By: Otto Winter <otto@otto-winter.com>

* uint32_t now

Co-Authored-By: Otto Winter <otto@otto-winter.com>

* A constant for bits in a byte just over-complicates the source code

Co-Authored-By: Otto Winter <otto@otto-winter.com>

* Review fixes

* Review fixes

* Review fixes

* Review fixes

* Review fixes

* Review fixes

* Review fixes

* Review fixes

* Travis fixes

* Travis fixes

* Travis fixes
2019-07-03 16:33:18 +02:00
Otto Winter
7ad593d674
Add setup, loop as reserved IDs
Fixes https://github.com/esphome/issues/issues/496
2019-07-03 15:25:38 +02:00
Otto Winter
13522c8f19
WIP: ESP8266 work on connection issues (#648)
* Erase all flash for USB uploads on ESP8266s

Previously, only erased "write regions".

Downside: Config for other FWs like tasmota could be affected

Upside: Potentially fixes some ESP8266 connection issues

Related: https://github.com/esphome/issues/issues/455#issuecomment-503524479

* Clear WiFi settings for ESP8266

Clears wifi settings from retained storage on ESP8266 (if set).

Unsure if this is the actual issue, but it won't cause problems either.

* Update wifi_component_esp8266.cpp

* Revert erase chip for testing

* Improve wait_time calculation
2019-07-02 13:03:11 +02:00
Otto Winter
d2938e82db
Add calibrate_polynomial sensor filter (#642)
* Add calibrate_polynomial sensor filter

* Fix

* Lint

* Format
2019-07-02 13:02:55 +02:00
Otto Winter
f95d4ca106
CT Clamp ADS1115 Improvements (#647)
Fixes https://github.com/esphome/issues/issues/457
2019-07-02 13:02:46 +02:00
Otto Winter
486bafd009
Fix upload_speed must be str 2019-07-01 15:11:11 +02:00
Otto Winter
341c99b4fa
Better DHT error reporting 2019-07-01 11:10:03 +02:00
Otto Winter
83095e8989
Fix climate MQTT HA interop
Fixes https://github.com/esphome/issues/issues/494
2019-07-01 11:09:44 +02:00
Otto Winter
71ba4bc31c
Fix api client disconnect handler 2019-07-01 11:09:20 +02:00
Otto Winter
894ec07cc8
Allow multiple files in CLI syntax 2019-07-01 11:09:06 +02:00
Otto Winter
59091100e4
Fix YAMLError with unicode 2019-06-30 12:19:03 +02:00
Otto Winter
e5485ab650
Fix registry entry value copy 2019-06-30 12:18:41 +02:00
Otto Winter
6c493d10d2
More scheduler fixes 2019-06-30 12:18:27 +02:00
Otto Winter
840f599631
Dallas improve warnings 2019-06-30 09:14:16 +02:00
Otto Winter
5a76e61b1e
Prevent too long fallback AP SSID 2019-06-30 09:14:04 +02:00
Otto Winter
7b4366bfef
Fix scheduler 2019-06-30 09:13:52 +02:00
Otto Winter
8dee5c5fe8
Adjust default reboot timeouts 2019-06-30 09:12:48 +02:00
Otto Winter
b2e6d222cd
Remove unnecessary update_interval from schemas 2019-06-28 11:30:15 +02:00
Otto Winter
2712c44004
Update dependencies (#653)
* Update pio dependencies

* Platformio 4

* Fixes

* Update platformio_api.py

* Lint
2019-06-28 11:29:37 +02:00
Otto Winter
82625a3080
Fix remote_transmitter wait time unit (#654)
Fixes https://github.com/esphome/issues/issues/485
2019-06-26 21:48:00 +02:00
mtl010957
49f9ad66db Adding ignore bits to narrow compare of received codes (#650)
* Adding bitmask to narrow compare of received codes
Updated test to add mask configuration

* Lint

* Handle bitmask as ignore characters per review comment

* Fixed test to cover ignore bits

* Lint

* Eliminate separate set_mask method per review comment
2019-06-26 21:47:34 +02:00
mtl010957
0dfab4d93c Fixed rc_switch dump off by one bit (#652)
* Fixed rc_switch dump off by one bit

* Proper fix per review comments
2019-06-26 21:42:49 +02:00
rnauber
5cd7f23065 Provide the lights current color to the addressable_lambda_effect. (#646)
* Provide the lights current color to the addressable_lambda_effect.

* Fix formatting

* More formatting

* Change the call signature of the lambda

* lint


Co-authored-by: olg <x>
2019-06-19 11:33:14 +02:00
mtl010957
27453afa4e Template tilt cover (#577)
* Enabling tilt control in the template cover
Added test
Add tilt option to publish action

* Added CONF_TILT to alidation schema per comment

* Removed default for CONF_TILT
2019-06-18 19:42:36 +02:00
Otto Winter
369d175694
Create Protobuf Plugin for automatically generating native API stubs (#633)
* Create Protobuf Plugin for automatically generating native API stubs

* Format

* Delete api.proto

* Cleanup, use no_delay conditionally

* Updates

* Update

* Lint

* Lint

* Fixes

* Camera

* CustomAPIDevice

* Fix negative VarInt, Add User-defined services arrays

* Home Assistant Event

* Fixes

* Update custom_api_device.h
2019-06-18 19:31:22 +02:00
Guillermo Ruffino
fc465d6d93 SMS Sender / Receiver (#522)
* add sim800l

* Increse SoftwareSerial Buffer Size

* use auto id on action

* lint

* lint

* add to test3.yaml

* lint


Co-authored-by: Guillermo Ruffino <guillermo.ruffino@pampatech.net>
2019-06-17 20:13:52 +02:00
Otto Winter
904a0b26ea
Make logger string memory usage more efficient (#641)
* Make logger string storing more efficient

* Lint
2019-06-16 19:14:24 +02:00
rnauber
c13f132399 Add set_threshold and get_value methods to ESP32TouchBinarySensor. (#631)
* Add set_threshold and get_value methods to ESP32TouchBinarySensor and add a test.

* esp32_touch_binary_adaptive: fix formatting

* Remove superfluous static from testcase

* Revert "Remove superfluous static from testcase"

This reverts commit 5a6a111aa8.

* Move into header file

* Update esp32_touch.h


Co-authored-by: olg <x>
Co-authored-by: Otto Winter <otto@otto-winter.com>
2019-06-16 19:14:13 +02:00
Andrew Thompson
db968bc6b0 Atmel M90E32AS Energy Metering IC. Found in CircuitSetup 2chan and 6chan energy meterss (#629)
* Atmel M90E32AS Energy Metering IC. Found in CircuitSetup 2can and 6chan energy meters

* fix style bugs

* Update esphome/components/atm90e32/atm90e32.cpp

Co-Authored-By: Otto Winter <otto@otto-winter.com>

* Properly put atm90e32_reg in namespace

* Use phase grouped config like ina3221

* Log why the component is marked failed, did not read back our register value

* 32bit register reads are 2s compliment

* Fix atm90e32 option name in test

* clang-format changes from travis-ci

* use new protected method names

* Whitespace changes to please Travis

* Update esphome/components/atm90e32/atm90e32.cpp

Co-Authored-By: Otto Winter <otto@otto-winter.com>

* Fix up type change for val_h/val_l

* Remove conditions around values with defaults

* Rename constants to match their value

* Remove 2's complement check


Co-authored-by: Andrew Thompson <andrew@whosonlocation.com>
Co-authored-by: Otto Winter <otto@otto-winter.com>
2019-06-16 12:00:15 +02:00
Guillermo Ruffino
7abe8875bd Fix home assistant binary sensor initial state (#632)
* Fix home assistant binary sensor initial state

* Fix send state log message

* fix new_state local name

* lint

* Trigger


Co-authored-by: Guillermo Ruffino <guillermo.ruffino@pampatech.net>
2019-06-15 18:02:17 +02:00
Mario Di Raimondo
dc9f304d94 Add Yashima climate component (#634) 2019-06-15 18:00:55 +02:00
Otto Winter
a09bd80636
Re-add CustomMQTTDevice class (#640)
* Re-add CustomMQTTDevice class

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

* Fix
2019-06-14 12:53:38 +02:00
Otto Winter
237ecb3adf
Fix remote_receiver raw binary sensor (#639)
* Fix remote_receiver raw binary sensor

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

* Lint
2019-06-14 12:53:27 +02:00
Otto Winter
9d65b77f13
Fix version.h file (#630)
* Fix version.h file

* Lint
2019-06-14 12:53:02 +02:00
Otto Winter
97f2becc9e
Fix globals.set (#635)
* Fix globals.set

* Update __init__.py
2019-06-14 12:40:14 +02:00
Otto Winter
f4160c363b
Fix russia timezone detection (#637)
Fixes https://github.com/esphome/issues/issues/378#issuecomment-500219634
2019-06-14 12:35:14 +02:00
Otto Winter
4fee9cc039
Fix ESP32 RCSwitch Dump Stack Smash Protection (#636)
Fixes https://github.com/esphome/issues/issues/366
2019-06-14 12:34:45 +02:00
Otto Winter
36f47ade70
Add Captive Portal (#624)
* WIP: Captive Portal

* Updates

* Updates

* Lint

* Fixes
2019-06-09 17:03:51 +02:00
Otto Winter
8db6f3129c
Fix scheduler 2019-06-09 13:19:57 +02:00
Otto Winter
75630a36f8
Add HW SPI support (#623)
* Add HW SPI support

* Update spi.cpp

* Lint

* ESP32 Compile Fix
2019-06-08 17:45:55 +02:00
Otto Winter
d2be58ba31
Work around ESP32 core WiFi Bug (#627)
* Work around ESP32 WiFi Bug

* Lint
2019-06-08 16:47:27 +02:00
Otto Winter
bbeb0461c4
Work around ESP32 BLE issue (#626) 2019-06-08 16:47:04 +02:00
Otto Winter
14fd08e225
Fix status binary sensor for MQTT (#628)
Fixes https://github.com/esphome/issues/issues/417
2019-06-08 16:44:25 +02:00
Otto Winter
f99352f7e0
Update base image to 1.8.3 (#625) 2019-06-08 16:44:13 +02:00
Otto Winter
b51cbc4207
Add central function scheduler (#609)
* Add central function scheduler

* Avoid unnecessary copies

* Lint

* Prevent more copies, store pointers

* Add never update_interval
2019-06-07 14:26:40 +02:00
Otto Winter
7a895adec9
Dashboard Update all button (#615)
* Add update all button

* Use bold
2019-06-07 14:26:28 +02:00
Otto Winter
4fe0c95ccb
Allow id() syntax for custom code (#621)
* Allow id() syntax for custom code

* Lint
2019-06-07 14:26:17 +02:00
Otto Winter
726b0e73d9
Add more efficient SPI implementation (#622)
* Add more efficient SPI implementation

* Lint

* Add 200KHZ

* Updates

* Fix write_byte

* Update from datasheet

* Shift clock

* Fix calculation
2019-06-07 14:25:57 +02:00
Brandon Davidson
88ccd60a08 Allow setting the initial mode of HLW8012 sensors (#611)
* Allow setting the initial mode of hlw8012 sensors

* Changes as per code review
2019-06-06 22:44:52 +02:00
Otto Winter
e6c16e9981
Fix sun default elevation (#620) 2019-06-06 15:12:40 +02:00
Otto Winter
1bd408937a
Fix integration sensor, add test (#619)
* Fix integration sensor, add test

* Fix

* Fix
2019-06-06 15:06:02 +02:00
Otto Winter
75326d2271
Make ForCondition a component (#616)
Fixes https://github.com/esphome/issues/issues/396
2019-06-06 13:15:49 +02:00
Otto Winter
76fe2e4871
Fix remote_receiver always shows sony (#617)
Fixes https://github.com/esphome/issues/issues/383#issuecomment-498370572
2019-06-06 13:15:37 +02:00
Otto Winter
16ae46e958
Template Cover don't auto-set current_operation (#612)
Fixes https://github.com/esphome/issues/issues/408
2019-06-06 13:13:56 +02:00
Otto Winter
73eea154d5
DHT22 ignore invalid values (#614)
Fixes https://github.com/esphome/issues/issues/397
2019-06-06 13:13:28 +02:00
Peter Tatrai
0d36e66125 Fix ForCondition time duration check (#610)
According documentation ForCondition should evaluate to true if a nested condition is true for at least the specified time duration and not the less.
2019-06-04 18:34:51 +02:00
Major Péter
970838ed09 Scan length for AddressableScanEffect (#608)
* Added scan_length to AddressableScanEffect (allow more than one LED)

* Added check for scan length being longer than addressable light

* Added config option 'scan_length' to AddressableScanEffect (default: 1)

* Renamed scan_length to scan_width, removed erroneous length check

* Fixed indentation issue in addressable_light_effect.h

Co-Authored-By: Otto Winter <otto@otto-winter.com>
2019-06-04 12:11:59 +02:00
gitolicious
0a21816a5a clear and disable editor while fetching contents (#603)
* clear and disable editor while fetching contents

* semicolon

Co-Authored-By: Otto Winter <otto@otto-winter.com>

* semicolon

Co-Authored-By: Otto Winter <otto@otto-winter.com>
2019-06-03 22:47:35 +02:00
Attila Darazs
30a542e763 Add backlight handling for lcd_pcf8574 (#573)
* Add backlight handling for lcd_pcf8574

Switch the backlight on or off by calling id(mydisplay).backlight()
or id(mydisplay).no_backlight() in lamda functions (assuming mydisplay
is the custom id for the LCD).

* Use abstract method


Co-authored-by: Attila Darazs <attila@darazs.com>
Co-authored-by: Otto Winter <otto@otto-winter.com>
2019-06-03 19:36:00 +02:00
Otto Winter
ebe64e24f1
Move ESPHome version define (#607)
* Move ESPHome version define

* Lint
2019-06-03 16:07:15 +02:00
Otto Winter
c53483a3b2
ESP8266 connect fixes (#605)
* ESP8266 Connection Fixes

* Update client.py

* Update mqtt_client.cpp

* Update mqtt_client.cpp

* Fix ping

* Async dump config

* Update base image to 1.7.0

* Update helpers.py

* Updates

* Update Dockerfile.lint
2019-06-03 15:21:36 +02:00
Otto Winter
fe24745815
Fix ADS1115 calculation (#606)
Fixes https://github.com/esphome/issues/issues/393
2019-06-03 14:31:01 +02:00
Otto Winter
b5e75793e1
Fix validation infinite loop with empty platform block (#598)
* Fix validation infinite loop with empty platform block

* Update util.py
2019-06-03 09:41:33 +02:00
Otto Winter
734cc989de
Fix hx711 (#602)
* Fix HX711

* Use signed value

* Update hx711.cpp
2019-06-03 09:41:13 +02:00
Otto Winter
2642750466
Fix color wipe effect (#599) 2019-06-03 09:05:20 +02:00
Otto Winter
ec9cc72320
Allow old remote_transmitter repeat schema (#601)
Fixes https://github.com/esphome/issues/issues/389
2019-06-02 15:27:32 +02:00
Otto Winter
c97a9d83c6
Add better esphomeyaml migration path (#600)
Fixes https://github.com/esphome/issues/issues/387
2019-06-02 15:26:44 +02:00
Otto Winter
f31c1480f3
Fix dashboard for Py3 installs (#596)
Fixes https://github.com/esphome/issues/issues/368
2019-06-01 22:00:19 +02:00
Otto Winter
291d4be772
Fix medium fan speed (#595) 2019-06-01 22:00:09 +02:00
Otto Winter
52584ec2be
Fix flicker light effect turning itself off (#594)
Fixes https://github.com/esphome/issues/issues/382
2019-06-01 21:59:59 +02:00
Otto Winter
3bc08e5222
Fix remote_receiver binary_sensor (#592)
Fixes https://github.com/esphome/issues/issues/369
2019-06-01 13:22:28 +02:00
Otto Winter
672f8d1719
Fix timezone detection (#586)
* Fix timezone detection

* Update __init__.py
2019-06-01 12:03:43 +02:00
Otto Winter
420c8b49e2
Fix scripts circular dependency (#591)
Fixes https://github.com/esphome/issues/issues/370
2019-06-01 12:00:10 +02:00
Otto Winter
f921997ee6
Fix addressable effects (#590) 2019-06-01 12:00:00 +02:00
Marc-Antoine Courteau
4e520d13dd List the correct boards when building for ESP32 (#589)
* List the ESP32 boards for ESP32 builds.

* Sort the list of valid boards.
2019-05-31 22:06:01 +02:00
Otto Winter
2617e5092b
SM16716 support (#541) 2019-05-31 15:05:37 +02:00
Otto Winter
d41ddf380c
Fix i2c setup priority (#585)
Fixes https://github.com/esphome/issues/issues/314
2019-05-31 13:40:12 +02:00
Otto Winter
a72c3ea9d7
Fix light partition (#584)
* Fix light partition

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

* Lint
2019-05-31 13:38:56 +02:00
Otto Winter
8be733efee
Fix MQTT on_message trigger (#583)
Fixes https://github.com/esphome/issues/issues/363
Fixes https://github.com/esphome/issues/issues/364
2019-05-31 11:17:46 +02:00
Otto Winter
2b186fdb0d
CLI show version better (#581)
Fixes https://github.com/esphome/feature-requests/issues/256
2019-05-31 10:43:11 +02:00
Otto Winter
3012fee013
Fix Rotary Encoder (#580)
Fixes https://github.com/esphome/issues/issues/360
2019-05-31 10:37:40 +02:00
Otto Winter
01db114724
Fix MQTT client_id changed (#579)
Fixes https://github.com/esphome/issues/issues/323
2019-05-31 10:37:10 +02:00
Otto Winter
e05688d639
Fix remote_receiver binary_sensor schema (#578)
Fixes https://github.com/esphome/issues/issues/353#issuecomment-497491863
2019-05-31 10:36:23 +02:00
Otto Winter
925b030718
Fix waveshare 7.5in model (#576)
* Fix waveshare 7.5in model

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

* Fix platformio travis errors
2019-05-30 22:27:51 +02:00
Otto Winter
9eba789c32
Dashboard work around Hass.io bug (#575)
* Dashboard work around Hass.io bug

Ref https://github.com/home-assistant/hassio/issues/1103

* Lint
2019-05-30 22:22:59 +02:00
Otto Winter
3e6ae4afda
Fix Sun Trigger (#572)
* Fix Sun Trigger

* Fix cwww lights
2019-05-30 20:01:58 +02:00
Otto Winter
27abb38ecb
Fix validation TypeError (#574) 2019-05-30 20:01:16 +02:00
Otto Winter
1ce257c721
Register light conditions (#570) 2019-05-30 13:12:12 +02:00
Jesse Hills
8dd971b25e Correctly set warm white variables (#569) 2019-05-30 09:33:47 +02:00
Otto Winter
31ddd3f668
Add uart.write action (#567)
* Add uart.write action

* Lint
2019-05-29 19:32:18 +02:00
Otto Winter
f35f6d2348
Use copy for custom includes (#568) 2019-05-29 19:30:35 +02:00
Otto Winter
02d34a0238
Fix TSL2561 invalid default (#566)
Ref https://github.com/esphome/issues/issues/352#issuecomment-496883794
2019-05-29 13:17:01 +02:00
Jesse Hills
3089ffa8e7 Add CT Clamp component (#559)
* Add CT Clamp component

* Update lint

* Some more fixes

* Make updates to work as an analog sensor consumer

* Remove unused imports
Update lint suggestions

* Move setup_priority to header

* Remove unused calibration value

* Remove Unique ID

- Will be auto generated

* Update to use loop and not slow down main loop


Co-authored-by: Otto Winter <otto@otto-winter.com>
2019-05-29 11:15:08 +02:00
Otto Winter
15cb0e4ff3
Warn if a component does long-running work in loop thread (#565)
* Warn if a component does long-running work in loop thread

* Update application.cpp
2019-05-29 11:13:05 +02:00
Otto Winter
fd9a9ecc63
Fix NTC steinhart-hart issue (#564) 2019-05-28 22:30:51 +02:00
gitolicious
bbb8ea7ec2 Renamed upload button (#563)
* Renamed upload button

* Renamed upload button in code
2019-05-28 22:30:38 +02:00
Otto Winter
667ed94e29
Fix NTC steinhart-hart issue 2019-05-28 22:27:39 +02:00
gitolicious
928df2dcd1 added download, edit and retry buttons to upload modal (#557)
* added download, edit and retry buttons to upload modal

* changed hide for disabled, resorted buttons

* moved upload action buttons to menu

* button changes

moved edit button from menu in upload modal
swapped validation button for upload in edit modal
2019-05-28 20:49:11 +02:00
Otto Winter
2decb8115c
Fix CWWW/RGBWW lights (#562) 2019-05-28 20:44:27 +02:00
Michiel van Turnhout
9d26c16471 Binary sensor map implementation (#551)
* add binary_sensor_map c code

* add python file

* fixed python and C++ code for new framework

* renamed add_sensor to add_channel

* travis

* Updates

- Use struct for channels_ array - heap allocation is not really necessary here.
- any_active can also be written as mask != 0
- Update setup priority to DATA
- Use shorter TAG (name is already long; not important)
- Quotes around name
- Add icon to sensor
- Use new cv.typed_schema
- Change CONF_CHANNEL to CONF_BINARY_SENSOR - makes it clearer that this option accepts a binary sensor (and not for example an int)
- Add test


Co-authored-by: Otto Winter <otto@otto-winter.com>
2019-05-28 20:41:10 +02:00
Michiel van Turnhout
5893506528 Mpr121 added debounce and thresholds config (#558)
* fixed code issues from previous PR

* travis line to long

* travis

* more travis

* Update esphome/components/mpr121/mpr121.h

Co-Authored-By: Otto Winter <otto@otto-winter.com>

* fixed issues

* fixed issues

* fixes remove duplicate line
remove threshold settings

* fixed touch release thresholds mixup
2019-05-28 20:39:20 +02:00
Otto Winter
df0d33c3cd
Waveshare enter deep sleep mode on shutdown (#561)
Fixes https://github.com/esphome/issues/issues/307

Only enters deep sleep mode when node turns off - not between updates because entering+exiting deep sleep takes some time (could be added later)
2019-05-28 20:22:50 +02:00
Otto Winter
61ba2e0f35
Add NTC and resistance sensor (#560)
* Add NTC and resistance sensor

Fixes https://github.com/esphome/feature-requests/issues/248

* Fix

* Fix platformio4 moved get_project_dir
2019-05-28 16:00:00 +02:00
Otto Winter
9fa1a334e6
Do not recompile on version change 2019-05-28 12:11:32 +02:00
gitolicious
f39d459555 added link from dashboard to web server, if configured (#556)
* added link from dashboard to web server, if configured

* linter fixes

* simplified integration lookup

* included loaded_integration in storage json

* included loaded_integration in storage json

* fixed loaded_integrations

plus linter changes

* fixed comment: List

Co-Authored-By: Otto Winter <otto@otto-winter.com>

* return empty list

Co-Authored-By: Otto Winter <otto@otto-winter.com>

* convert to list

Co-Authored-By: Otto Winter <otto@otto-winter.com>

* default to empty list on missing loaded_integrations

Co-Authored-By: Otto Winter <otto@otto-winter.com>

* None check no longer needed

Co-Authored-By: Otto Winter <otto@otto-winter.com>

* None check no longer needed

Co-Authored-By: Otto Winter <otto@otto-winter.com>

* removed newline
2019-05-28 10:19:17 +02:00
Otto Winter
6e7d25ed42
Bump version to v1.14.0-dev 2019-05-27 21:51:43 +02:00
Guillermo Ruffino
85513476ce Add coolix climate ❄ 🔥 (#521)
* Lint

* add coolix climate ❄ 🔥

* Fixes

* Reviewed

* Fix for dev

ClimateDevice was renamed to Climate

* Remove stale method

* Lint

* Initialize target temperature, avoid NAN value

* Use clamp and round value

* Set to verbose message

Not really relevant to the user

* Remove constructor

Name is now set in climate.register_climate - saves integrations from having to declare a constructor

* Fix, add test


Co-authored-by: Otto Winter <otto@otto-winter.com>
2019-05-27 21:09:16 +02:00
Guillermo Ruffino
e62443933c Add TCL112 climate (#523)
* Add TCL112 climate

* fix default mode

* Updates

* Update

* Update climate.py

My mistake :(


Co-authored-by: Otto Winter <otto@otto-winter.com>
2019-05-27 20:17:12 +02:00
Teemu Mikkonen
3b48aa5911 Support for AM2320 temperature and humidity sensor (#554)
Support for AM2320 temperature and humidity sensor

Co-authored-by: Mikkonen Teemu <teemu.mikkonen@iki.fi>
2019-05-27 20:00:32 +02:00
Otto Winter
b7daee533a
Lint 2019-05-27 20:00:00 +02:00
Otto Winter
7a14ab825e
Add examples to Nextion page (#548)
* Update nextion.h

* Added more examples

* Update nextion.h

* Update nextion.h

* Update nextion.h
2019-05-27 19:36:17 +02:00
Otto Winter
4323ca88c3
Add test for automation light effect 2019-05-27 19:35:36 +02:00
Otto Winter
4bc3067725
Add light restore mode
I don't want users to rely on setup priority.

Ref https://github.com/esphome/esphome-docs/pull/248
2019-05-27 19:22:16 +02:00
Otto Winter
28f2a7f99c
Update nextion.h 2019-05-27 19:12:43 +02:00
Brandon Davidson
72218171b3 Don't fall back to the global availability topic if it is empty (#553)
Fixes esphome/issues#320
2019-05-27 17:21:01 +02:00
Otto Winter
0d9f5ef363
Update nextion.h 2019-05-27 16:51:01 +02:00
Otto Winter
7b5c4359c6
Update nextion.h 2019-05-27 15:39:01 +02:00
Otto Winter
72a80f559a
Use relative include, add check 2019-05-27 13:06:45 +02:00
Otto Winter
dac624231f
Fix custom output, add test
Fixes https://github.com/esphome/issues/issues/346
2019-05-27 09:58:55 +02:00