Commit Graph

418 Commits

Author SHA1 Message Date
Guillermo Ruffino
43cf3063e0
removes comments from lambda (#998)
* removes comments from lambda

* include comments in lambda test

* pylint no else return
2020-04-05 22:14:49 -03:00
Bartłomiej Biernacki
4620ad6124
Support for pcd8544 (nokia 5110 and 3310) screen (#973)
* First version of working compontent for pc8544 screen

* Fixed lint errors

* Fixed lint errors #2
2020-04-04 18:23:23 -03:00
Germain Masse
4ec636c08f
Add AHT10 sensor (#949) 2020-03-21 15:31:07 -03:00
John
4cb30a22ac
Corrections to default register values of ATM90E32 component (#982)
* Corrections to default register values of ATM90E32 component
2020-03-13 10:27:19 -07:00
Tim Savage
c632b0e1d4
Unittests for esphome python code (#931) 2020-03-12 14:27:22 -07:00
Nicholas Peters
714d28a61a
Add TMP117 component (#992)
* Create TMP117 sensor component
2020-03-12 14:25:00 -07:00
Pavel
c60989a7be
pzemac total energy support (#933)
* add energy support in pzemac sensor

Co-authored-by: Sergio Mayoral Martinez <sergiomayoralmartinez@gmail.com>
Co-authored-by: t151602 <sergio.mayoralmartinez@telefonica.com>
Co-authored-by: Otto Winter <otto@otto-winter.com>
2020-03-12 13:37:57 -07:00
Derek Hageman
11b727fdf7
SCD30 fixes and improvements (#962)
* SCD30 improvements
2020-03-11 17:39:40 -07:00
Evgeny
4402a6eb4c
Add TM1651 simple level, turn on, turn off actions (#920)
* Add TM1651 simple level action

* fixed brightness validation

* Updated lib, fixed import

* Added turn_on, turn_off actions

* Fixed after lint
2020-02-15 20:52:20 -03:00
Héctor Giménez
2d0d794a9d Daikin climate ir component (#964)
* Daikin ARC43XXX IR remote controller support

* Format and lint fixes

* Check temperature values against allowed min/max
2020-01-22 19:38:04 -03:00
Guillermo Ruffino
990a4d4774 Display tm1637 (#946)
* add TM1637 support
2020-01-13 14:44:55 -08:00
Keith Burzinski
6a60f01753 Add transmit pioneer (#922)
* Added pioneer_protocol to support transmit_pioneer
2020-01-13 14:39:17 -08:00
Guillermo Ruffino
420c860424
fix climate-ir bad merge (#935)
* fix climate-ir bad merge

* add mitshubishi test
2019-12-31 00:20:11 -03:00
Jesse Hills
f5b7cc81d8 Add RFBridge component (#896)
* Add RFBridge component

* Fix format issues

* Rename methods

* More formatting

* Fix line length

* Apply suggestions from code review

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

* Check uart settings on dump

* Make receiving local to the loop

* FIx code order and schema

* Add rf_bridge to test file

* Apply suggestions from code review

Co-Authored-By: Otto Winter <otto@otto-winter.com>
2019-12-10 11:09:35 +01:00
Nick Whyte
74aca2137b Add duty cycle output component (#894)
* Add duty cycle output component

* cleanup + tests

* format

* duty_cycle -> slow_pwm

* .

* clang-format

* ESP_LOGD -> ESPLOGVV

Co-Authored-By: Otto Winter <otto@otto-winter.com>
2019-12-07 17:15:04 +01:00
Otto Winter
0698be3995
Better/stricter pin validation (#903)
* Better/stricter pin validation

* Update tests
2019-12-04 16:47:34 +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
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
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
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
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
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
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
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
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
ae8700447e
Add sensor force_update option (#783)
* Add sensor force_update option

* Add test
2019-10-21 15:46:39 +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
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
4fa11dfa68
Lint 2019-10-19 21:59:55 +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
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
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
Nikolay Vasilchuk
d51c0f13c0 SenseAir S8 CO2 sensor support (#705)
* Компилится

* Tests

* Checksum calculation

* Read status
2019-10-17 21:37:24 +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
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
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
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
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
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
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
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
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
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
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
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
d2938e82db
Add calibrate_polynomial sensor filter (#642)
* Add calibrate_polynomial sensor filter

* Fix

* Lint

* Format
2019-07-02 13:02:55 +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
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
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
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
97f2becc9e
Fix globals.set (#635)
* Fix globals.set

* Update __init__.py
2019-06-14 12:40:14 +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
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
1bd408937a
Fix integration sensor, add test (#619)
* Fix integration sensor, add test

* Fix

* Fix
2019-06-06 15:06:02 +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
1ce257c721
Register light conditions (#570) 2019-05-30 13:12:12 +02:00
Otto Winter
31ddd3f668
Add uart.write action (#567)
* Add uart.write action

* Lint
2019-05-29 19:32:18 +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
667ed94e29
Fix NTC steinhart-hart issue 2019-05-28 22:27:39 +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
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
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
4323ca88c3
Add test for automation light effect 2019-05-27 19:35:36 +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
Pavel Pletenev
9ed06444e1 Suggested fix for empty domain (#555)
* Suggested fix for empty domain

Signed-off-by: delphi <cpp.create@gmail.com>

* Added proposed changes

Signed-off-by: delphi <cpp.create@gmail.com>
2019-05-26 10:28:46 +02:00
Otto Winter
12ff280d3b
Lint 2019-05-24 23:08:04 +02:00
Otto Winter
5bb963fa82
TTP229 BSF support (#547)
* TTP229 BSF support

* MULTI_CONF
2019-05-13 13:11:10 +02:00
Otto Winter
83fa51a580
GPS time source (#543)
* GSP Time

* GPS Time

* Lint

* Multi conf
2019-05-13 13:11:02 +02:00
Otto Winter
0281914507
CCS811 support (#536)
* CCS811

* Move define, add test

* Remove sun artifact

* Lint

* Lint
2019-05-13 13:06:14 +02:00
Otto Winter
3e044db9f1
Merge branch 'dev' into ttp229-bsf 2019-05-13 13:01:08 +02:00
Otto Winter
f811b1157c
Updates for 1.13 (#546)
* Update CI matcher

* Check Executable bit

* Quicklint

* Updates

* Allow pm1.0 and pm10.0 for PMS5003ST

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

* PowerSupplyRequester

* Lint

* Include debug data in generated main.cpp

* Updates

* Auto-select bit_depth

* Updates
2019-05-12 23:04:36 +02:00
Otto Winter
797aadaf26
Update CI linter (#544)
* Update CI matcher

* Check Executable bit
2019-05-11 15:12:30 +02:00
Otto Winter
7bab279c6a
Auto-Generate esphome.h (#538) 2019-05-10 22:13:26 +02:00
Otto Winter
1d6dd3aa5e
TTP229 BSF support 2019-05-10 21:44:02 +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
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
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
Otto Winter
de51bdda5b
Fix filter_out: nan filer (#486)
* Fix filter_out nan filter

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

* Add test
2019-03-18 15:07:20 +01:00
Otto Winter
0d7bb1286a
More changes for 1.12 (#483)
* Print error when ESP32 BLE tracker used together with beacon

* Update

* Enable PSRAM

* Fix test
2019-03-17 16:04:49 +01:00
puuu
23df5d8af7 Support SDS011 component. (#467)
* Support SDS011 component.

* improve if condition

* Check update interval is multiple of minute

* do not allow update intervals longer than 30 min

* fix sensor schema name

* remove query_mode

* Warn if rx_only mode used together with update interval

* Allow update intervals below 1min

Messed that up before, as the docs say update intervals below 1min are allowed

* Use update interval in minutes

* use set_update_interval_min() to set update interval
2019-03-06 12:39:52 +01:00
Otto Winter
5c14ca030a
Add Wifi info text sensor (#473)
* Add WiFi Info text sensor

* Lint

* Fix register

* Add newline at end of file
2019-03-05 14:05:51 +01:00
Otto Winter
0fc6a027a7
Add copy output platform (#472) 2019-03-05 13:54:33 +01:00
Otto Winter
5b4f98d414
Revert "Remove piolibdeps cache"
This reverts commit e009f21a72.
2019-03-05 13:53:09 +01:00
Otto Winter
99861259d7
Add MCP23017 (#466)
* Add MCP23017

* Add test
2019-03-03 16:51:55 +01:00
Otto Winter
5a102c2ab7
Rewrite interrupt components (#464)
* Rewrite intterupt components

* Fix test
2019-03-03 16:47:10 +01:00
Otto Winter
4b017e2096
Add WiFi/MQTT/API connected condition (#465)
* Add WiFi/MQTT/API connected condition

* Add tests

* Fix namespace
2019-03-03 16:45:56 +01:00
Otto Winter
7c65d44976
Add rotary encoder min/max value (#463) 2019-02-28 10:17:38 +01:00
Otto Winter
1778dd4df9
Add linear calibration sensor filter (#454)
* Add linear calibrate filter

* Remove filter_nan

* Add test
2019-02-26 19:38:39 +01:00
Michiel van Turnhout
92f8b043ce Add MPR121 Capacitive Touch Sensor (#449)
* module mpr121

* added mpr121 sensor and binary sensor

* added tests

* removed CONF_CHANNELS, it is not supported in the esphome-code mpr121
code

* changed namespace for mpr121 to binary_sensor

* Update esphome/components/binary_sensor/mpr121.py

Co-Authored-By: mvturnho <qris.online@gmail.com>

* fixed class names

* fix lint errors
2019-02-24 21:48:28 +01:00
Otto Winter
3d1cce2a29
Add report_position test
Fixes https://github.com/esphome/issues/issues/46
2019-02-22 17:43:30 +01:00
Otto Winter
41d637affe
Add wait_until action (#440) 2019-02-17 19:27:33 +01:00
Otto Winter
f311a1bb30
Add display page abstraction (#435) 2019-02-17 00:35:23 +01:00
Otto Winter
944f0169cb
Add light partition platform (#434) 2019-02-16 16:47:23 +01:00
Otto Winter
4da0e0c223
Add text_sensor.template.publish action (#433)
* Add text_sensor.template.publish action

* Fix

* Add test
2019-02-16 16:47:05 +01:00
Otto Winter
52c0b45f41
Add RC5 IR code support (#432) 2019-02-16 15:30:59 +01:00
Otto Winter
5e61014e98
Update Gitlab CI 2019-02-13 21:14:03 +01:00
Otto Winter
3d9301a0f7
Rename esphomeyaml to esphome (#426)
* Rename

* Update

* Add migration

* Fix

* Fix dashboard

* Change test

* Fixes

* Code cleanup

* Fix import order

* Update

* Automate docker builds

* Shellcheck
2019-02-13 16:54:02 +01:00
Brandon Davidson
1b8d242505 Enable use of alternate hardware UARTs for logging (#427)
* Enable use of alternate hardware UARTs for logging

Enable use of Serial1 on ESP8266 and Serial1/Serial2 on ESP32 for logging.
This is frequently done on ESP8266 to allow use of Serial for UART TX+RX,
while maintaining logging output on Serial1 which is TX-only via GPIO2.

* ESPHOMELIB_UART -> UART_SELECTION_UART; HW_UART -> HARDWARE_UART

* Add test3 to travis; remove test4

* Set DEBUG_ESP_PORT based on logger UART setting
2019-02-13 11:20:22 +01:00
Jesse Hills
463ad6f94b Add support for JVC remote transmitting and receiving (#423)
* Add support for JVC remote transmitting and receiving

* Add missing import

* Fix line length
2019-02-11 18:09:31 +01:00
Otto Winter
e4e315f723
Revert "Upgrade espressif32 package to 1.6.0 (#355)" (#422)
* Revert "Upgrade espressif32 package to 1.6.0 (#355)"

This reverts commit e347cb538d.

* Fix revert

* Fix
2019-02-11 16:50:10 +01:00
Otto Winter
4b7a41922c
Add template publish actions and switch triggers (#391)
* Add template publish actions and switch triggers

* Fix

* Add tests

* Add cover

* Lint

* Fix

* Fix
2019-02-10 23:35:07 +01:00
Otto Winter
61762bf299
Replace optimistic with Assumed State (#394)
* Replace optimistic with Assumed State

* Add tests

* Fix

* Lint
2019-02-10 23:28:56 +01:00
Otto Winter
4c8bd7a70c
Fix build 2019-02-10 20:29:06 +01:00
Otto Winter
d9cf91210e
Add local mDNS responder for .local (#386)
* Add local mDNS responder

* Fix

* Use mDNS in dashboard status

* Lint

* Lint

* Fix test

* Remove hostname

* Fix use enum

* Lint
2019-02-10 16:57:34 +01:00
Otto Winter
f185ba7a21
Add Homeassistant Binary Sensor (#409) 2019-02-10 16:31:17 +01:00
Otto Winter
176c712eeb
Disable MQTT if not used (#373)
* Disable MQTT if not used

* Lint
2019-01-29 17:29:21 +01:00
Otto Winter
7b26ecc0dc
Remove Heartbeat Filter (#393)
* Remove Heartbeat Filter

* Fix tests
2019-01-29 16:45:50 +01:00
Otto Winter
e347cb538d
Upgrade espressif32 package to 1.6.0 (#355)
* Upgrade espressif32 package to 1.6.0

* Remove AsyncTCP pinning

* Lint

* Fix AsyncTCP version

* Fix test2
2019-01-19 21:44:47 +01:00
Otto Winter
e0fe0a2835
Remove deep sleep run_cycles (#353)
* Remove deep sleep run_cycles

* Fix test
2019-01-19 16:51:20 +01:00
Otto Winter
5ac9b8d545
Allow IPv4 addresses for SNTP servers (#340)
Fixes https://github.com/OttoWinter/esphomelib/issues/395
2019-01-15 20:13:20 +01:00
Otto Winter
4f5389998f
Add homeassistant.service test 2019-01-14 11:09:32 +01:00
Otto Winter
5a1e806d14
Fix interval trigger (#313) 2019-01-09 15:18:54 +01:00
Otto Winter
01b49e8d59
Home Assistant platform tests 2019-01-06 19:03:34 +01:00
Otto Winter
52dbd35118
Add neopixelbus tests 2019-01-06 16:59:11 +01:00
Otto Winter
92439abeb4
Add tests, Fix stuff 2019-01-06 11:43:14 +01:00
Otto Winter
e72ef9e061
Add ESP32 Ethernet Support (#301)
* Fix

* Build flags

* Fix
2019-01-05 20:47:33 +01:00
sherbang
38c24fd100 Add support for MAX31855 sensor (#258)
* Add support for MAX31855 sensor

* Update for latest core changes

* Update max31855.py
2019-01-05 20:08:25 +01:00
Otto Winter
7f9462ebf3
Add APDS9960 Support (#300) 2019-01-05 19:52:01 +01:00
Otto Winter
00ff99cc7d
Addressable Lights (#294) 2019-01-02 13:04:27 +01:00
Otto Winter
da2821ab36
Add native ESPHome API (#265)
* Esphomeapi

* Updates

* Remove MQTT from wizard

* Add protobuf to requirements

* Fix

* API Client updates

* Dump config on API connect

* Old WiFi config migration

* Home Assistant state import

* Lint
2018-12-18 19:31:43 +01:00
Otto Winter
7c7032c59e
[Huge] Util Refactor, Dashboard Improvements, Hass.io Auth API, Better Validation Errors, Conditions, Custom Platforms, Substitutions (#234)
* Implement custom sensor platform

* Update

* Ethernet

* Lint

* Fix

* Login page

* Rename cookie secret

* Update manifest

* Update cookie check logic

* Favicon

* Fix

* Favicon manifest

* Fix

* Fix

* Fix

* Use hostname

* Message

* Temporary commit for screenshot

* Automatic board selection

* Undo temporary commit

* Update esphomeyaml-edge

* In-dashboard editing and hosting files locally

* Update esphomeyaml-edge

* Better ANSI color escaping

* Message

* Lint

* Download Efficiency

* Fix gitlab

* Fix

* Rename extra_libraries to libraries

* Add example

* Update README.md

* Update README.md

* Update README.md

* HassIO -> Hass.io

* Updates

* Add update available notice

* Update

* Fix substitutions

* Better error message

* Re-do dashboard ANSI colors

* Only include FastLED if user says so

* Autoscroll logs

* Remove old checks

* Use safer RedirectText

* Improvements

* Fix

* Use enviornment variable

* Use http://hassio/host/info

* Fix conditions

* Update platformio versions

* Revert "Use enviornment variable"

This reverts commit 7f038eb5d2.

* Fix

* README update

* Temp

* Better invalid config messages

* Platformio debug

* Improve error messages

* Debug

* Remove debug

* Multi Conf

* Update

* Better paths

* Remove unused

* Fixes

* Lint

* lib_ignore

* Try fix platformio colors

* Fix dashboard scrolling

* Revert

* Lint

* Revert
2018-12-05 21:22:06 +01:00
Otto Winter
2b88c987da
Fix GPIO input schema validator (#253) 2018-12-02 13:16:02 +01:00
puuu
083c2fce05 Add MY9231 support (#227) 2018-11-13 16:51:30 +01:00
Otto Winter
15331edb78
Let esphomeyaml know about class inheritance (#229)
* Allow overriding setup priority

* Add inheritance tree

* Global variables

* Tests and better validation

* Fix

* Lint
2018-11-12 23:30:31 +01:00
Otto Winter
8203b8fcd3
Add total daily energy sensor (#220)
* Add total daily energy sensor

* Add test
2018-11-09 20:27:19 +01:00
Otto Winter
0ad61f4a95
Add binary sensor multi click trigger (#226) 2018-11-09 20:18:04 +01:00
Otto Winter
9fd4076ab8
Revert Add power on value to GPIO switch (#223)
* Revert Add power on value to GPIO switch

* Fix tests

* Fix
2018-11-09 20:08:35 +01:00
Otto Winter
3ec931ffa4
Add restore state option to template switch (#222)
* Add restore state option to template switch

* Add test
2018-11-09 20:05:50 +01:00
Otto Winter
2fab7e73b9
Add send_first_at option to sliding window sensor filter (#207)
* Add send_first_at option to sliding window sensor filter

* Lint
2018-10-26 22:59:03 +02:00
Otto Winter
af4e2bf61d
Add Stepper Motor Support (#206)
* Add stepper support

* Fix output set_level

* Lint
2018-10-26 22:57:03 +02:00
Otto Winter
8bbfbc4cc1
Add logger.log action (#198)
* Add logger.log Action

* Simple schema

* Validate printf

* Improve error message

* Undo unfix tests :)
2018-10-20 15:19:59 +02:00
Otto Winter
25c66ed8ca
Improve API naming convention consistency (#197)
* Improve API naming convention consistency

* Fix
2018-10-20 15:16:58 +02:00
Otto Winter
92b6ed4180
Add FastLED color correction option (#200)
* Add FastLED color correction option

* Add test
2018-10-20 13:14:02 +02:00
Otto Winter
9efd9f4fe8
Add PMSX003 Particulate Matter Sensor (#192) 2018-10-20 12:58:52 +02:00
Otto Winter
34fc2147a4
Add update component action and scripts (#196)
* Add update component action

* Add script component
2018-10-20 12:58:02 +02:00
Otto Winter
629f2b128e
Add MQTT publish JSON action and subscribe JSON trigger (#193)
* Add MQTT publish JSON action and subscribe JSON trigger

* Lint
2018-10-20 12:41:00 +02:00
Otto Winter
81bc400340
Add PN532 On Tag Trigger (#189)
* Add PN532 On Tag Trigger

* Lint

* Fix 😶

* Fix
2018-10-17 21:29:44 +02:00
Otto Winter
75628b96a1
Add Text Sensors (#166)
* Text Sensors

* Add version text sensor

* Fix

* Fixes

* Add tests

* Add template text sensor

* Lint

* Fix test
2018-10-17 21:24:02 +02:00
Otto Winter
b1f7ed4fdc
Add CSE776 for Sonoff Pow R2 (#190) 2018-10-17 21:14:31 +02:00
Otto Winter
820067ae5a
GPIO Switch Power On Value v2 (#183) 2018-10-16 22:58:26 +02:00
Otto Winter
8d395e5338
MQTT different log level (#167)
* Add option to have different log level over MQTT

* Add Test

* Lint
2018-10-14 18:46:17 +02:00
Otto Winter
6f54afec00
Add MQTT Subscribe sensor (#175) 2018-10-14 18:45:13 +02:00
Otto Winter
6a24145be6
Fix Wifi power_save_mode option (#178)
* Fix WIFI power_save_mode option

* Add Test
2018-10-13 21:17:19 +02:00
escoand
4a2cdbf31c Add Samsung IR protocol (#176)
* add Samsung ir protocol

* fix pylint

* add test

* add transmitter
2018-10-13 19:21:06 +02:00
Otto Winter
cf264a2743
Fix binary sensor heartbeat not working (#130) 2018-09-27 16:34:02 +02:00
Otto Winter
ce4b339d16
Split up BLE tests into new file 2018-09-26 18:39:41 +02:00
Otto Winter
2abbe1bca3
Updates 2018-09-25 10:30:45 +02:00
Otto Winter
74c70509c2
Fix docker build 2018-09-25 10:30:45 +02:00