Commit graph

131 commits

Author SHA1 Message Date
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