Commit Graph

1164 Commits

Author SHA1 Message Date
Niclas Larsson
8a08d1fb5d Handle yaml merge keys correcly. (#888)
* Handle yaml merge keys correcly.

* Removed old debug bool.

* Deleted after request from @OttoWinder.

* Small refactoring.

Removed unused variable `value`
Small refactoring to make the code clearer.
Added comments.

* Fix merge sequence edge case
2019-12-05 00:27:49 +01:00
Otto Winter
ea652e3587
Fix ESP32 interrupt enable/disable switched
Needs to be manually cherry-picked
2019-12-04 23:51:27 +01:00
Otto Winter
7a6df38515
Add ESP8266 core v2.6.2 (#905)
* Add ESP8266 core v2.6.2

* Upstream ESP8266 Wifi fixes

* Replace disable_interrupt with InterruptLock C++ class

* Update code to use InterruptLock

* Lint

* Update dht.cpp

* Improve InterruptLock docs, mark as ICACHE_RAM_ATTR

* Fixes
2019-12-04 19:30:10 +01:00
Otto Winter
bba6d6897d
Update dependencies (#906)
PyYAML 5.1.2 -> 5.2 https://github.com/yaml/pyyaml/blob/master/CHANGES
flake8 3.6.0 -> 3.7.9 https://github.com/PyCQA/flake8/tree/master/docs/source/release-notes
paho-mqtt 1.4.0 -> 1.5.0 https://github.com/eclipse/paho.mqtt.python/blob/master/ChangeLog.txt
platformio 4.0.3 -> 4.1.0 https://github.com/platformio/platformio-core/releases
protobuf 3.10.0 -> 3.11.1 https://github.com/protocolbuffers/protobuf/releases
pylint 2.3.0 -> 2.4.4 http://pylint.pycqa.org/en/latest/whatsnew/changelog.html#what-s-new-in-pylint-2-4-4
2019-12-04 17:13:34 +01:00
Otto Winter
33c08812cc
Update ESP32 BLE ADV parse to match BLE spec (#904)
* Update ESP32 BLE ADV parse to match BLE spec

* Update xiaomi

* Update ruuvi

* Format

* Update esp32_ble_tracker.cpp

* Fix log

* Format

* Update xiaomi_ble.cpp
2019-12-04 17:12:26 +01:00
Otto Winter
f68a3a9334
Disable default wait_time for rc_switch (#900)
See also 82625a3080 (commitcomment-36092052)
2019-12-04 16:48:08 +01:00
Otto Winter
0698be3995
Better/stricter pin validation (#903)
* Better/stricter pin validation

* Update tests
2019-12-04 16:47:34 +01:00
Otto Winter
064589934c
Ignore ESP32 Camera unknown framesizes (#901)
Fixes https://github.com/esphome/issues/issues/866
2019-12-04 16:04:46 +01:00
Otto Winter
e9e92afc9e
Optimize application loop speed (#860)
* Optimize application loop speed

* Also check call_loop

* Remove duplicate code

* Fixes
2019-12-04 16:03:37 +01:00
Otto Winter
e86f2e993f
Pulse counter validate not both disabled (#902) 2019-12-04 15:59:27 +01:00
Otto Winter
d26cd85306
web_server call setup_controller (#899) 2019-12-04 15:59:08 +01:00
Otto Winter
73f80a8ea1
Fix MQTT logs Int or String expected Python 3 (#898)
Fixes https://github.com/esphome/issues/issues/850
2019-12-04 15:58:58 +01:00
Otto Winter
b7dff4bbab
Add magic value REPLACEME (#881)
* Add magic value REPLACEME

* Lint
2019-12-04 15:58:40 +01:00
Evgeny
31d964c16a Add TM1561 support (#893)
* Add TM1561 support

* Fixed after clang-tidy

* Fixed after clang-tidy

* Fixed after clang-tidy, updated lib_deps

* Fixed after clang-tidy, updated formatting

* Added actions, removed from display domain

* Protected methods naming

* float casting

* float casting
2019-12-04 13:11:53 +01:00
Nad
7f895abc24 Add support for Sensirion SPS30 Particulate Matter sensors (#891)
* Add support for Sensirion SPS30 Particulate Matter sensors

* Remove blocking of the main thread on initialization;
Improve wording on the debug messages;
Add robustness in re-initialization of reconnected or replaced sensors;

* Fix code formatting;


Co-authored-by: Nad <valordk@github>
2019-12-04 12:34:10 +01:00
Guillermo Ruffino
0f406c38eb
fix climate_ir on receive optional (#897)
* fix climate on receive optional

* add climate tests
2019-12-03 11:50:06 -03:00
Andrej Komelj
6433da13a3 Add B/W support for Waveshare 2.90in (B) screen (#889)
* Add B/W support for Waveshare 2.90in (B) screen

* Fix for() loop source code formatting
2019-12-03 14:18:05 +01:00
Tim P
fa1adfd934 Add QMC5883L Sensor + Improvements to HMC5883L (#671)
* Add QMC5883L and Updated HMC5883L

* add tests

* changed to oversampling

* fix pylint

* fix private method

* typo fix

* fix protected method

* Clean up code and PR recomendations

* fix tests

* remote file

* fix qmc oversampling unit

* Remove hmc5883l config logging

Either the units are converted to the user values like 1x, 8x oversampling or not printed at all. Printing the machine-value of these is only confusing users.

* Changes for validate_enum

Move stuff that can be done beforehand out of the bound function, use text_type for py2/3 compatability.

* Remove unused constant

* Remove duplicate tests

* Repeat remove config print

* remove changes to test2 since bin is to large

* Add comment to HMC5583L


Co-authored-by: Timothy Purchas <timothy@TPF.local>
Co-authored-by: Otto Winter <otto@otto-winter.com>
2019-11-26 18:43:11 +01:00
DAVe3283
36ffef083b Fix MAX31865 edge case. (#882)
In a heavy EMI environment, reading the current config from the MAX31865 can
fail, such as switching from a 4-wire sensor to a 3-wire sensor. This causes
the temperature value to be off wildly, but still technically valid, so it
doesn't get reported as a sensor failure.

Since we know what configuration we want, rather than send it to the MAX31865
on setup and ask for it over and over (propagating any error as we write it
back), instead store the base configuration and work from that to change modes.
This not only avoids propagating any error, it also saves a lot of unnecessary
reads from the MAX31865.
2019-11-26 18:31:33 +01:00
Daniel Kucera
fe89dcdc08 added idle action for climate (#859)
* added idle

* more clear state description

* Also add drying/fan

Putting it in this PR because it will be put in the same aioesphomeapi release anyway.

* Update bang_bang for idle action


Co-authored-by: root <root@mail.danman.eu>
Co-authored-by: Otto Winter <otto@otto-winter.com>
2019-11-26 17:56:04 +01:00
KristopherMackowiak
be36eef939 fix: template cover add position action (#877)
* Update const.py

* Update __init__.py

* Update template_cover.cpp

* Update __init__.py

* Update test3.yaml

* formatting code

* formatting code 2

* removed position lambda

* Update test3.yaml

* Update __init__.py
2019-11-21 17:57:27 -03:00
John
6a0268b852 fix chip_temperature for atm90e32 component (#865)
* Added more data to atm90e32 component

* ignore

* correction

* Delete 6chan_energy_meter.yaml

* PR request changes

* repository test branch

* Update setup.py

* Update const.py

* delete test yaml

* fix chip_temperature_sensor

This was throwing an error if chip_temperature was used. It needed to be changed from temp to temperature.

* default

* Update test1.yaml
2019-11-20 17:47:34 +01:00
Airy André
b7b23ffdb2 Decode DHT11 decimal part (#861)
* Decode DHT11 decimal part

* Fix comment

* Fix comment

* Handle negative temp for some DHT11  - code from the DHT12 component

* Don't use the fractional part if the checksum is the 2 bytes one
2019-11-20 17:00:32 +01:00
warpzone
ad76709d00 fix the problem of missing part of advertising packet when activ… (#868)
* fix the problem of missing part of advertising packet when active scan is enabled.

* fix for ci-suggest-changes
2019-11-20 16:54:25 +01:00
Otto Winter
072cd5b83e
Change ESP8266 default wifi output power (#862)
See also https://github.com/esphome/issues/issues/455
2019-11-17 23:28:43 +01:00
Otto Winter
cfd42ea162
Revert ESP32 BLE Tracker defaults (#863)
Fixes https://github.com/esphome/issues/issues/824
Fixes https://github.com/esphome/issues/issues/851
2019-11-17 23:28:30 +01:00
Otto Winter
b55544b860
Fix MQTT python 3 stringify IPAddress Type (#864)
Fixes https://github.com/esphome/issues/issues/850
2019-11-17 23:25:20 +01:00
Otto Winter
5becaebdda
Improve WiFi disconnect messages (#857)
* Improve WiFi disconnect messages

* Fix

* Update wifi_component_esp32.cpp
2019-11-17 23:25:04 +01:00
Guillermo Ruffino
1814e4a46b Add climate dry fan (#845)
* add climate dry fan

* clang-format

* updates, add swing mode, add back compat with old ha

* revert client-config add swing

* sort const.py

* fix missing retur
2019-11-16 16:34:11 +01:00
Brandon Davidson
4f8f59f705 Tuya: Fix init sequence and handle wifi test command (#820)
* Handle WiFi test command

Also rename commands to match Tuya protocol docs

* Fix init sequence and product info check

* Fix clang-format suggestions

* Additional changes based on code review

* Fix temp command buffer scope

* Let the interval timer fire the first heatbeat

* Fix init steps; add logging

* Lint

* Remove setup_priority override

* Add delay to dump_config

* Refactor dump sequence

* Fix verbose logging

* Fix lints

* Don't bother suppressing duplicate config dumps

* nolint


Co-authored-by: Otto Winter <otto@otto-winter.com>
2019-11-14 13:43:44 +01:00
Brandon Davidson
aca306d120 Fix logger uart conflict check (#858)
* Fix logger uart conflict check

* Fix class for check func

* Fix syntax

Hope lint is OK with moving the end of the conditional outside the #IFDEF

* Move end of conditional inside ifdef and remove extra whitespace

* Simplify

clang-format did not like the ifdefs and was reformatting in a way that killed clang-tidy.

Simple solution is to use logger's hw_serial as source of truth

Also simplifies the code - uart doesn't need to know what the logger uart settings mean
2019-11-14 13:36:55 +01:00
Otto Winter
694395ac91
Switch to 115200 baud upload if 460800 fails (#856)
* Switch to 115200 baud upload if 460800 fails

* Update __main__.py
2019-11-14 12:42:50 +01:00
Mark
092bca0d63 Atm90e32 pf fix (#841)
* correct set_pf_sensor to set_power_factor_senor

* remove junk files added in error

* correct sensors.yaml reference to set_reactive_power

* Fixes
2019-11-13 08:49:59 +01:00
Otto Winter
a386bb476f
Fix output_power log strings, lint 2019-11-12 22:26:35 +01:00
Samuel Sieb
39a520f552 add position reporting to the template cover (#821)
* add position reporting to the template cover

* remove duplicate import

* use config flag instead


Co-authored-by: Samuel Sieb <samuel@sieb.net>
2019-11-12 22:24:13 +01:00
Otto Winter
663f84f8b4
Mark python 3.5 support deprecated (#849)
* Mark python 3.5 unsupported

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

* Update .travis.yml

* Update typing dep
2019-11-12 21:44:28 +01:00
Otto Winter
8677d47777
Fix PZEM004T v2 (#846)
Fixes https://github.com/esphome/issues/issues/817
2019-11-12 21:44:20 +01:00
Otto Winter
4f1a28d460
Adjust some units (#852)
* Adjust some units

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

* Lint
2019-11-12 19:04:39 +01:00
Otto Winter
7b142525b4
Check DHT sensor exists before publishing (#850)
Fixes https://github.com/esphome/issues/issues/841
2019-11-12 19:04:11 +01:00
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