Commit Graph

304 Commits

Author SHA1 Message Date
Keith Burzinski
095d3181cd
SSD1322 display support (#1405) 2020-12-30 22:52:41 +13:00
Keith Burzinski
9aa14a2e83
Add full SSD1327 display support (#1406) 2020-12-30 22:48:23 +13:00
Daniel Schramm
498b59e998
Canbus + MCP2515 including ExtID support (#1384) 2020-12-22 08:27:20 +13:00
SenexCrenshaw
7cd4c3bdd3
MCP23SXX I/O Expander - SPI (#1068)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2020-12-07 06:43:55 +13:00
Michel Marti
b3169deda7
scd30: Allow setting temperature offset (#1400) 2020-12-04 07:21:10 +13:00
Alex
3afb564a48
Configurable OTA Safe Mode (#1393) 2020-12-02 11:41:39 +13:00
SenexCrenshaw
7ff3f752e2
New display ST7735 (#1066)
* Initial Commit - ST7735

* Updated for CI checks

* Updated for travis build

* Travis fixes

* Travis line too long

* Travis fixes

* Fixed up travis format issues

* Travis Fixes

* Initial Commit - ST7735

* Updated for CI checks

* Updated for travis build

* Travis fixes

* Travis line too long

* Travis fixes

* Fixed up travis format issues

* Travis Fixes

* Update to new color API and added test

* Check fixes

* Fixed sid length in test

* Cleaned up whitespaces

* kbx81 recommended fixes

* test fix

* Fixes of fixes

* Fixed test1.yaml

* Fixed test1.yaml

* Changed digital pin #s to gpio

* Updated to match kbx's color names

* Typo for ST7735_INITR_MINI_160X80

* Updated 8bit color space code
Added to_rgb_332 to color.h
fixed typo

* Added in to_rgb_332,to_bgr_332, rgb_332to_rgb_556 and a more generic scale

* Fixed MADCTL

* Fixp MADCTL

* Implemented usrbgr option
updated color to support 332 bgr conversion
typo fix

* Updated to_bgr_332

* Fix up for clang

* FIx up init code. type in buffer caused overrun

* fixup protected names

* typos

* Matched use_bgr to its conf

* color.h red fix in bgr_233to_rgb_565

* Fix ST7735_INITR_MINI_160X80

* Renamed bgr_233to_bgr_565 to match its function
Color space leak in bgr_233to_bgr_565.
cleaned up init code for displays.

* Fix

* clang fix

* Started Color Conversion

* Added various bit color functions
add triadto

* lint changes

* Various fixes

* Various formatting fixes. Wish my checks worked!

* Updated color api to support different formats
removed to_rgb_565

* lint clang fixes

* Test1 fix

* test1.yaml fix

* fixed 565 in ILI9341Display

* Added CodeOwners

* Updated CODEOWNERS

* changed to to332 and to565

* Waiting for color.h changes

* Stage changes

* Removed all changes except this driver

* Moved color functions into driver

* lint changes

* Lint and removed unrelated display driver changes

* Lint changes

* Initial Commit - ST7735

* Updated for CI checks

* Updated for travis build

* Travis fixes

* Travis line too long

* Travis fixes

* Fixed up travis format issues

* Travis Fixes

* Initial Commit - ST7735

* Updated for CI checks

* Updated for travis build

* Travis fixes

* Travis line too long

* Travis fixes

* Fixed up travis format issues

* Travis Fixes

* Update to new color API and added test

* Check fixes

* Fixed sid length in test

* Cleaned up whitespaces

* kbx81 recommended fixes

* test fix

* Fixes of fixes

* Fixed test1.yaml

* Fixed test1.yaml

* Changed digital pin #s to gpio

* Updated to match kbx's color names

* Typo for ST7735_INITR_MINI_160X80

* Updated 8bit color space code
Added to_rgb_332 to color.h
fixed typo

* Added in to_rgb_332,to_bgr_332, rgb_332to_rgb_556 and a more generic scale

* Fixed MADCTL

* Fixp MADCTL

* Implemented usrbgr option
updated color to support 332 bgr conversion
typo fix

* Updated to_bgr_332

* Fix up for clang

* FIx up init code. type in buffer caused overrun

* fixup protected names

* typos

* Matched use_bgr to its conf

* color.h red fix in bgr_233to_rgb_565

* Fix ST7735_INITR_MINI_160X80

* Renamed bgr_233to_bgr_565 to match its function
Color space leak in bgr_233to_bgr_565.
cleaned up init code for displays.

* Fix

* clang fix

* Started Color Conversion

* Added various bit color functions
add triadto

* lint changes

* Various fixes

* Various formatting fixes. Wish my checks worked!

* Updated color api to support different formats
removed to_rgb_565

* lint clang fixes

* Test1 fix

* test1.yaml fix

* fixed 565 in ILI9341Display

* Added CodeOwners

* Updated CODEOWNERS

* changed to to332 and to565

* Waiting for color.h changes

* Stage changes

* Removed all changes except this driver

* Moved color functions into driver

* lint changes

* Lint and removed unrelated display driver changes

* Lint changes

* Updated with latest color api

* pulled from origin

* Updated for color.h changes

* pulled test1 from dev

* Added test
2020-11-23 14:37:43 -03:00
SenexCrenshaw
d821ead92a
Formatted test yaml files (#1382) 2020-11-19 23:59:19 -03:00
Keith Burzinski
08f1eac8b2
SSD1331 display support (#1244) 2020-11-18 19:34:53 +13:00
MoA
a9a00f139b
Add climate.hitachi_ac344 (#1336)
* Add climate.hitachi_ac344

* Add Hitachi AC344 Climate IR test

* Fixes unhandled switch-case in fan-mode

* Fixes logging format

* Fixes file mode

* Lint clang-tidy

* Lint clang-tidy

* Static cast float to uint8
git push

* Remove comment and debug code

* Change log verbosity to VV
2020-11-17 22:05:12 -03:00
Samuel Sieb
d20caa9d60
add support for EZO sensor circuits (#1239)
Co-authored-by: Samuel Sieb <samuel@sieb.net>
2020-11-17 22:01:42 +13:00
Marcos Pérez Ferro
7e40d4246c
Adding ADE7953 irq_pin (#1359) 2020-11-16 09:30:14 +13:00
0hax
5a2b14cfa4
components: teleinfo: electrical counter information. (#1108)
Signed-off-by: 0hax <0hax@protonmail.com>
Co-authored-by: Otto Winter <otto@otto-winter.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2020-11-16 07:08:19 +13:00
Michel Marti
f2d218e5ad
scd30: Allow setting ambient pressure compensation (#1365) 2020-11-16 07:03:08 +13:00
Yaroslav
c9055f2aef
Allow Tuya climate temperature_multiplier to be current/target multiplier (#1345)
* Separate temperature_multiplier to current/target multiplier

* Apply suggestions from code review

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2020-11-12 06:31:35 +13:00
Yaroslav
9fed7cab5f
Add support for Tuya MCU 0x1C (obtain local time) (#1344)
* Fix some Tuya devices not handling commands sent without delay

* Also do not report WiFi status if MCU does not support it

* Support Tuya MCU 0x1c command (obtain local time)

* Use #ifdef USE_TIME to handle optional dependency on RTC

* Rename Tuya clock config variable to time to be consistent with the codebase

* Add tuya time configuration to test4
2020-11-11 11:31:28 +13:00
Daniel Hyles
fc01a70b65
Hbridge christmas light (#1251)
* Hbridge Christmas light component

Can be used for Christmas lights that use 2 wires to run 2 different strings of lights using a hbridge driver.

* Add Test

NOTE: I am unable to test this via the docker image

* Update hbridge_light_output.h

* Update hbridge_light_output.h

* Update hbridge_light_output.h

* Update light.py

* Fixed duty as white value bug fixed

* lint changes

* Name case change

* thanks lint
2020-11-08 14:46:34 +13:00
Alexander Pohl
49cb8fd9d3
Add support for ATC_MiThermometer (#1291)
* Add support for additional Xiaomi BLE sensors (#1027)

* Revert "Add support for additional Xiaomi BLE sensors (#1027)"

This reverts commit b2723830f4.

* initial ATC Mithermometer component

* removed references to xiaomi_ble

* temp, humi and batt in % working, todo: battery in mV

* report battery level in volt

* report battery level again in percent

* Add files via upload

* add ATC Mithermometer component

* remove some comments

* fix travis ci build issues

* mark codeowner, make functions protected

* add newlines, remove spaces

* two lines after function or class definition

* update codeowners

* Bump flake8 from 3.8.3 to 3.8.4

Bumps [flake8](https://gitlab.com/pycqa/flake8) from 3.8.3 to 3.8.4.
- [Release notes](https://gitlab.com/pycqa/flake8/tags)
- [Commits](https://gitlab.com/pycqa/flake8/compare/3.8.3...3.8.4)

Signed-off-by: dependabot[bot] <support@github.com>

* Add files via upload

* Bump pytest from 6.0.2 to 6.1.1

Bumps [pytest](https://github.com/pytest-dev/pytest) from 6.0.2 to 6.1.1.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/6.0.2...6.1.1)

Signed-off-by: dependabot[bot] <support@github.com>

* add ATC battery voltage to test2.yaml

* fix lint-python

* Bump colorlog from 4.2.1 to 4.4.0

Bumps [colorlog](https://github.com/borntyping/python-colorlog) from 4.2.1 to 4.4.0.
- [Release notes](https://github.com/borntyping/python-colorlog/releases)
- [Commits](https://github.com/borntyping/python-colorlog/compare/v4.2.1...v4.4.0)

Signed-off-by: dependabot[bot] <support@github.com>

* Bump voluptuous from 0.11.7 to 0.12.0

Bumps [voluptuous](https://github.com/alecthomas/voluptuous) from 0.11.7 to 0.12.0.
- [Release notes](https://github.com/alecthomas/voluptuous/releases)
- [Changelog](https://github.com/alecthomas/voluptuous/blob/master/CHANGELOG.md)
- [Commits](https://github.com/alecthomas/voluptuous/commits/v0.12.0)

Signed-off-by: dependabot[bot] <support@github.com>

* restore requirements

* move codeowner above dependencies

* Revert "restore requirements"

This reverts commit 3c9fd8b421.

* Revert "Bump voluptuous from 0.11.7 to 0.12.0"

This reverts commit 8eb0dba1c3.

* Revert "Bump flake8 from 3.8.3 to 3.8.4"

This reverts commit 20952632db.

* Revert "Bump colorlog from 4.2.1 to 4.4.0"

This reverts commit 87bbf95d86.

* Revert "Bump pytest from 6.0.2 to 6.1.1"

This reverts commit 1b6ed80431.

Co-authored-by: vevsvevs <v-v@mail.ru>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-11-04 06:36:11 +13:00
Dimitris Zervas
e536316e3d
Add contrast option to PCD8544 (#1348)
* Add contrast option to PCD8544. Closes #1519

* Minor fixes as instructed by @jesserockz
2020-11-03 10:05:20 +13:00
Jesse Hills
a6c46eb8e5
Adds support for RF Bridge advanced codes (#1246)
* WIP: Advanced commands for portisch firmware

* Fix string code sending

* clang formatting

* Add new rf_bridge functions to test

* Add advanced code received trigger

* Fix copy-paste mistake in the advanced sending

* Fix log message to be consistent

* clang

* Remove extra +
2020-11-03 07:34:29 +13:00
Nico B
3fcdaaefe0
add FastLED YAML option for data rate (#1338)
* fix: FastLED SPI_DATA_RATE being truncated to 8 bits

FastLED expects SPI_DATA_RATE as an uint32_t, but we had it as uint8_t.
Fix that to avoid the data rate being truncated.

* fastled: allow specifying data rate

Previously, we've just taken the default data rate from FastLED.
However, that does not always work properly. In my case, I had a
slow level shifter that couldn't keep up with the 1 MHz data
rate default for WS2801. Long cabling might also be a reason why
one might want to reduce the data rate.

This will add a new optional "data_rate" config option where one
may specify the desired data rate as a frequency:

  light:
    - platform: fastled_spi
      chipset: WS2801
      data_pin: GPIO23
      clock_pin: GPIO22
      data_rate: 500kHz
      num_leds: 178
2020-11-02 07:45:21 +13:00
Jesse Hills
20dd744680
Add on_clockwise and on_anticlockwise triggers to rotary encoder (#1330) 2020-11-02 06:24:26 +13:00
Jesse Hills
0059a6de46
Pn532 upgrades (#1302)
* Move pn532 -> pn532_spi
Add pn532_i2c

* Update i2c address

* Always wait for ready byte before reading

* Generalise the pn532 a bit more so less code in i2c and spi implementations

* clang

* Add pn532_i2c to test1

* Try to get setup working

* Fixes

* More updates

* Command consts

* A few upgrades

* Change text back to include 'new'

* Fix data reading
2020-10-31 19:55:48 -03:00
Guillermo Ruffino
59cdc32970
Add rc522 (#1298)
* wip

* first working

* feat complete

* add CODEOWNERS

* renamed to spi, reset optional

* add test

* fix CODEOWNERS
2020-10-27 12:41:57 +13:00
Harald Nagel
adb51cf733
Add MCP9808 temperature sensor (#1169)
* Add MCP9808 temperature sensor

* Change from component to sensor; code fixes

- Change from component to sensor
- Change magic numbers to constants

* Fix incorrect logging levels

* Add precision to debug log

* Fix logging level

Co-authored-by: Guillermo Ruffino <glm.net@gmail.com>

* Fix bug with comparison to NAN

Co-authored-by: Guillermo Ruffino <glm.net@gmail.com>
2020-10-27 07:24:26 +13:00
Tim Savage
d97a9bf8e8
Added tmp102 temperature sensor support (#929)
* Added tmp102 temperature sensor support

* Added sensor to test3.yaml

* Moved docstring to component root

* Tweak formatting from clang-format script

* Removed extra newline at the end of the file to satisfy pylint

* Update schema to match that of other single-value sensors

In ESPHome, sensors that only expose one value do not put the sensor under another key.

* Add missing import

* Fix test after structural change to component

* removed unused setting

* Update esphome/components/tmp102/tmp102.cpp

Co-authored-by: Otto Winter <otto@otto-winter.com>
Co-authored-by: Guillermo Ruffino <glm.net@gmail.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2020-10-27 07:00:43 +13:00
Alexander Leisentritt
f034472e2a
Add LYWSD02 battery sensor (#1334)
* add battery sensor for lywsd02

* update test
2020-10-27 06:53:17 +13:00
Ash McKenzie
5c86f332b2
Add new time.has_time condition (#1255) 2020-10-04 17:22:28 +02:00
Jesse Hills
99598d87a9
Readds the battery level for xiaomi_hhccjcy01 (#1288) 2020-09-19 23:37:34 -03:00
Jesse Hills
703e9673c2
Adds new homeassistant.tag_scanned action (#1281) 2020-09-16 12:29:20 +02:00
Jesse Hills
ff24023b39
Adds support for Tuya Climate temperature multiplier (#1276)
* Adds support for temperature multiplier

* Add new multiplier to test file

* Remove import

* Fixes
2020-09-14 19:33:37 -03:00
Jesse Hills
fd6ac529fb
Script mode fix (#1238) 2020-08-06 17:08:48 +02:00
Ian Leeder
aea2e9a6bb
Add hyphen to supported name characters (#1223)
Co-authored-by: Otto Winter <otto@otto-winter.com>
2020-07-30 00:02:34 +02:00
Otto Winter
52639a0a7c
Cleanup web server prometheus integration (#1192) 2020-07-27 12:07:05 +02:00
Guillermo Ruffino
f6e3070dd8
rtttl player (#1171)
* rtttl player

* fixes

* Cleanup, add action, condition, etc.

* add test

* updates

* fixes

* Add better error messages

* lint
2020-07-25 12:57:11 -03:00
Peter Kuehne
ebbfab608c
Feature/wizard tests (#1167) 2020-07-23 23:51:14 +02:00
Peter Kuehne
67b4dcf8ae
Fix unit test warning for hypothesis deprecation (#1163) 2020-07-16 09:50:06 +02:00
Peter Kuehne
3ec9bcaed6
Feature/component test fixture (#1142) 2020-07-15 14:04:00 +02:00
Otto Winter
d5c59292c8
Add pytest to CI (#1138) 2020-07-15 14:00:02 +02:00
Samuel Sieb
13696b1ec4
add mqtt speed topics for fan (#1140)
Co-authored-by: Samuel Sieb <samuel@sieb.net>
2020-07-15 11:45:54 +02:00
Peter Kuehne
5776e70d7c
Bug/fix internal flag in binary sensor (#1136) 2020-07-14 17:59:03 +02:00
Peter Kuehne
2012c769f6
Feature/fix unit tests (#1129) 2020-07-14 13:11:58 +02:00
Carlos Gustavo Sarmiento
351ecf9bd4
Allow updating pid control params (#1115) 2020-07-13 22:30:17 +02:00
Dmitry Berezovsky
e6f42fa6f0
Packages feature (#1052)
* Started to work on packages feature

* Added some more validation to packages config

* Fixed some linter warnings

* Updated tests

* Reordered consts to avoid linter error

* Reordered consts to avoid linter error

* Refactored test yaml files to integrate into existing test pipeline

Co-authored-by: Dmitry Berezovsky <dmitry.berezovsky@logicify.com>
2020-07-13 11:45:06 -03:00
Joppy
582ac4ac81
Add support for Toshiba heat pumps (#1121)
The IR signals are based on captures from the WH-H01EE remote
controller.

Both transmit and receive are supported.
2020-07-13 09:23:53 -03:00
Guillermo Ruffino
1a47e4b524 update test readme 2020-07-12 14:36:07 -03:00
Wauter
e41ea42074
feature request 398 add 'hide timestamp' option for version text sensor (#1085)
Co-authored-by: Guillermo Ruffino <glm.net@gmail.com>
2020-07-11 19:55:30 -03:00
Jesse Hills
ed5f207eba
Add support for Tuya Binary Sensors (#1089)
* Add Tuya binary sensor

* Add tuya binary sensor to test4

* Fix copy/paste

* Forgot id
2020-07-11 19:50:41 -03:00
Jesse Hills
a76b8e745b
Add support for Tuya Sensors (#1088)
* Add Tuya sensor

* Add tuya sensor to test4

* Forgot id
2020-07-11 19:46:10 -03:00
Jesse Hills
68d29c5af5
Add support for Tuya Climate devices (#1076)
* Start support for tuya climate devices

* Add tuya climate to test4

* Fix lint and cast

* Remove blank line

* Try to display accurate action based on observed behaviour.

* Fix action when in off mode

* Improve config dump

* merge use of CONF_SWITCH_DATAPOINT

Co-authored-by: Guillermo Ruffino <glm.net@gmail.com>
2020-07-11 19:04:34 -03:00
Jesse Hills
ef9e6e4d6e
Add support for Tuya Switches (#1074)
* Add tuya component to test4.yaml

* Add support for tuya switches

* Better config dump
2020-07-11 17:52:29 -03:00
Keith Burzinski
417a3cdf51
Add SSD1351 OLED display support (#1100)
* Add SSD1351 display support

* Linting round 2

* Updated/rebased for proper Color support

* Fix color image processing
2020-07-09 23:49:26 -03:00
peq123
e5d4e12457
RGBWW - added channel interlock for RGB vs white (#1042)
* Update light_color_values.h

* Update light_color_values.h

* Update light_color_values.h

* Update light_color_values.h

* colour relative to white value

* Update light_state.cpp

* Update light_state.cpp

* Update light_state.cpp

* Update light_state.cpp

* Update light_color_values.h

* Update light_state.cpp

* linting

* Update light_state.cpp

* Update light_color_values.h

* more lint

* more lint

* Update light_state.cpp

* Update light_state.cpp

* Update light_state.cpp

* add optional interlock

* Update test1.yaml

* Update light_state.cpp

* Update light_state.h

* interlock

* optional interlock.

* interlock as trait

* color interlock as trait

* optional color interlock....

* optional color interlock

* Update light_color_values.h

* Lint checks....

* making travis happy

* making sure gamma_correct fix is included

* Update light_color_values.h

* making travis happy

* clang-format

* Code tidy

* Update light_color_values.h

* Update light_color_values.h
2020-07-09 20:29:44 -03:00
Keith Burzinski
d4e76185bd
Thermostat component (#1105)
* Add thermostat component

* Add hysteresis accessor

* Linted

* Fixed up const.py and test

* Fix test...again...oops
2020-07-01 22:38:51 -03:00
Guillermo Ruffino
f479eae714
Revert "Climate bang bang enhancements (#1061)" (#1106)
This reverts commit 0082c5b459.
2020-07-01 14:08:55 -03:00
rspaargaren
83a12d980e
Vl53 long range (#1055)
* Update vl53l0x_sensor.cpp

Changed values for long range support

* added true / false option for long range detection

* debug missing ,

* further debug option long_range

* Travis updates

* added travis tests

* Travis removed space should be good now

* update to trigger travis again

* added old test files for PR

* added vl5310x sensor for compile testing

* fix variable names

Co-authored-by: Guillermo Ruffino <glm.net@gmail.com>
2020-06-28 18:47:43 -03:00
Keith Burzinski
491f7e96f0
Add support for ST7789V display module (as on TTGO T-Display) (#1050)
* TFT-LCD ST7789V of ESP32 TTGO.

This patch allows you to use TFT-LCD ST7789V of ESP32 TTGO

* Lots of polish and a few tweaks

* Add test

* Add color to core, take 1

* Where did those tabs come from?

* Fix lines too long

* Added color component

* Linted

* Rebase, SPI fix, test

* Shuffle bits

* One more thing...oops

* Image type fix...oops

* Make display_buffer use Color

* Fix BGR/RGB, remove predefined colors

* Fix all the things

* renamed colors to color

* migrate max7219

Co-authored-by: musk95 <musk95@naver.com>
Co-authored-by: Guillermo Ruffino <glm.net@gmail.com>
2020-06-28 18:37:36 -03:00
rspaargaren
bfb9cb6732
Max7219 in Dot Matrix configuration (#1053)
* push final files

* Update max7219digit.cpp

reenter small bug fix on uint8 declaration

* small debug

* set max offset to 100

* remove unwanted file

* Update font file to make travis happy

* travis update

* further progress in keeping Yarvis happy

* travis font

* travis will never be satisfied but one step ahead

* YARVIS TAKE 10000000

* never ending yarvis

* Almost there with Yarvis

* removed double declaration YARVIS

* added namespace to font file (TRAVIS)

* almost there last changes for YARVIS

* further travis updates

* removed files for travis

* fix display.py length of line travis remark

* further update on display.py

* file delete travis requirement

* final entry for travis?

* Some further debug on max offset

* Travis updates

* scroll_left_new

* 90degreesrotate

* added option to config rotate90

* four orientations for the chips

* new setup for scroll

* replaced small bug missing {}

* debug changed int8 to int16 on scroll function

* removed small merge failure

* travis updates round 1

* travis updates round 2

* travis details round 3

* added options to set scroll parameters in yaml conf

* removed ttf and png to satisfy travis

* travis update

* travis updates

* travis

* further updates after input from @glmnet

* remove deleted comments

* Added ENUM TYPE to config file

* change in test file

* removed test files

* updates for pull request

* Typing error removed

* travis update

* PR updates travis

* Update test3.yaml

* Update test3.yaml

* update device schema as per #988

* Delete partitions.csv

* repair on image display and invert routine

* further update and a bit of cleanup

* added writing 0 in draw pixel

* small deletion error

* travis updates

* Update max7219digit.cpp

adding intensity value to dynamically set value

* Update max7219digit.h

adding option for intensity

* remove some files from tests
2020-06-28 17:33:06 -03:00
phjr
3c9712d683
add support for SN74HC595 shift register (#1083)
* add support for SN74HC595 shift register

* fix linter errors

* more linter reported issues fixed

* hopefully last linter error cleanup

* one more linter fix

* looks like the linter is always keeping stuff for later, is this the final fix?

* add test

Co-authored-by: Guillermo Ruffino <glm.net@gmail.com>
2020-06-27 19:08:15 -03:00
square99
82d5d50d61
Add LG Climate IR (#1097)
* Add LG Climate ir

* Add LG Climate IR

* Add LG Climate IR

* Add LG Climate IR

* Add LG Climate IR

* Add LG Climate IR

* Add LG Climate IR

Co-authored-by: Sangheon Heo <square99@SangHeonui-Macmini.local>
2020-06-21 22:29:43 -03:00
Samuel Sieb
f9a8629157
fix percentage handling (#1094)
* fix percentage handling

* add test

* fix lint errors

Co-authored-by: Samuel Sieb <samuel@sieb.net>
2020-06-19 20:59:19 -03:00
Keith Burzinski
0082c5b459
Climate bang bang enhancements (#1061)
* Add fan support to bang bang controller

* Fix heat-only and cool-only modes

* Added support for all climate actions and modes

* Fix up some comments

* Fan_only mode behavior tweak

* Updated test

* Updated test, take 2

* Add accessor methods for easier use in lambadas

* Revert "Add accessor methods for easier use in lambadas"

This reverts commit f15713129cd5587242a08ad1e2ee37cbf075aa03.

Don't code late at night when sleepy.

* Fix single/dual setpoint support

* Linted

* Properly implement single-point, validation improvements

* Another quick fix...sigh

* Update tests

* Update tests, take 2

* Revert "Update tests, take 2"

This reverts commit 71bb7fccc53d95a7d221e80ea0a931fb3cfd9a0c.

Nope.

* Revert "Update tests"

This reverts commit 42044291efaaf09858f29ab27bbc3aa9e8b80ee9.

Nope 2.

* Updated/fixed tests

* Revert "Updated/fixed tests"

This reverts commit a1a5b1c7db9a240b9da668b6e48abe1dd7910777.

Taking a different approach.

* Revert "Another quick fix...sigh"

This reverts commit 6b1955724a2de3c2d1534ec206dd5794bbb5f568.

Taking a different approach.

* Revert "Properly implement single-point, validation improvements"

This reverts commit f5bfff099e1dc58edd3898da8655c147adde2301.

Taking a different approach.

* Single/dual set point fixes, full validation

* Fix test

* Fix restore-on-boot, clean up comments

* Decouple two-point/auto operation, more polish

* One last away mode tweak

* Added set point validation

* Clean up over-publishing, always call action after boot

* Add fan support to bang bang controller

* Fix heat-only and cool-only modes

* Added support for all climate actions and modes

* Fix up some comments

* Fan_only mode behavior tweak

* Updated test

* Updated test, take 2

* Add accessor methods for easier use in lambadas

* Revert "Add accessor methods for easier use in lambadas"

This reverts commit f15713129cd5587242a08ad1e2ee37cbf075aa03.

Don't code late at night when sleepy.

* Fix single/dual setpoint support

* Linted

* Properly implement single-point, validation improvements

* Another quick fix...sigh

* Update tests

* Update tests, take 2

* Revert "Update tests, take 2"

This reverts commit 71bb7fccc53d95a7d221e80ea0a931fb3cfd9a0c.

Nope.

* Revert "Update tests"

This reverts commit 42044291efaaf09858f29ab27bbc3aa9e8b80ee9.

Nope 2.

* Updated/fixed tests

* Revert "Updated/fixed tests"

This reverts commit a1a5b1c7db9a240b9da668b6e48abe1dd7910777.

Taking a different approach.

* Revert "Another quick fix...sigh"

This reverts commit 6b1955724a2de3c2d1534ec206dd5794bbb5f568.

Taking a different approach.

* Revert "Properly implement single-point, validation improvements"

This reverts commit f5bfff099e1dc58edd3898da8655c147adde2301.

Taking a different approach.

* Single/dual set point fixes, full validation

* Fix test

* Fix restore-on-boot, clean up comments

* Decouple two-point/auto operation, more polish

* One last away mode tweak

* Added set point validation

* Clean up over-publishing, always call action after boot

* Added refresh() function to allow easy on-device state refreshing
2020-06-17 20:16:42 -03:00
Jim Persson
0bb81e5b2d
Add support for controlling fan direction (#1051)
* Fix fan oscillation trait not being used

* Add fan direction support to SpeedFan

* Add fan direction to API

* Add fan direction support to BinaryFan

* Fix CI errors

* Fix python format

* Change some ordering to trigger CI

* Add test for the configuration
2020-06-14 16:54:31 -03:00
Kamil Trzciński
0c0dec2534
Add WLED support (#1092)
A component to support [WLED](https://github.com/Aircoookie/WLED/wiki/UDP-Realtime-Control).
This allows to control addressable LEDs over WiFi/UDP, by pushing data right into LEDs.

The most useful to use [Prismatik](https://github.com/psieg/Lightpack) to create
an immersive effect on PC.

It supports all WLED protocols:
- WARLS
- DRGB
- DRGBW
- DNRGB
- WLED Notifier

Co-authored-by: Guillermo Ruffino <glm.net@gmail.com>
2020-06-12 20:50:09 -03:00
Kamil Trzciński
d1b051a6bd
Add Adalight support (#956)
A component to support [Adalight](https://learn.adafruit.com/adalight-diy-ambient-tv-lighting).
This allows to control addressable LEDs over UART, by pushing data right into LEDs.

The most useful to use [Prismatik](https://github.com/psieg/Lightpack) to create
an immersive effect on PC.

Co-authored-by: Guillermo Ruffino <glm.net@gmail.com>
2020-06-12 20:34:38 -03:00
Kamil Trzciński
27204aa53c
Add E1.31 support (#950)
This adds a `e131` component that allows
to register `e131` addressable light effect.

This uses an internal implementation that
is thread-safe instead of using external libraries.
2020-06-12 20:17:13 -03:00
Evgeny
42007d03d4
AQI calculator for HM3301 (#1011)
* HM3301 AQI calculator

* remove logs

* fixed after lint

* fixed after lint

* fixed after lint

* check NP for AQI sensor

* validation for AQI sensor
2020-06-11 23:14:54 -03:00
Marvin Gaube
f63fd9696f
Add Webserver Prometheus support for sensor, binary sensor, fan, light, cover and switch (#1032) 2020-06-09 22:00:12 -03:00
Kamil Trzciński
cd7af19e7c
Extend uart: with rx_buffer_size: (#1006)
* Extend `uart:` with `rx_buffer_size:`

This allows to configure `rx_buffer_size:`
to efficiently receive big payloads over UART

* lint

* remove old default value

* add test

Co-authored-by: Guillermo Ruffino <glm.net@gmail.com>
2020-06-09 21:22:06 -03:00
rradar
d1f4c2ab57
BH1750 Measurement time (#997)
* BH1750 Measurement time

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

* lint

* add test

Co-authored-by: Otto Winter <otto@otto-winter.com>
Co-authored-by: Guillermo Ruffino <glm.net@gmail.com>
2020-05-28 23:10:34 -03:00
Alexander Pohl
3fba3a5e2e
Add support for additional Xiaomi BLE sensors (#1027) (#1027) 2020-05-26 19:33:28 -03:00
declanshanaghy
e64246f642
Adding support for MAX31856 Thermocouple Temperature Sensor (feature #700) (#1039) 2020-05-24 19:33:59 -03:00
0hax
fb2b7ade41
Uart improvments (#1024)
* uart: Add support for specifying the number of bits and parity.

ESP8266SwSerial doesn't really check parity but just read the parity bit
and ignore it when receiving data.

Signed-off-by: 0hax <0hax@protonmail.com>

* uart: support begin and end methods.

A component may need to reset uart buffer/status by using begin() and
end() methods. This is useful for example when a component needs to be
sure it is not reading garbage from previously received data over uart.
For end() methods with software serial, disabling interrupt is
currently impossible because of a bug in esp8266 Core:
https://github.com/esp8266/Arduino/issues/6049

Signed-off-by: 0hax <0hax@protonmail.com>

* esphal: add support for detaching an interrupt.

That's needed when a component needs to enable/disable interrupt on a
gpio.

Signed-off-by: 0hax <0hax@protonmail.com>

* uart: rename CONF_NR_BITS to CONF_DATA_BITS_NUMBER.

Signed-off-by: 0hax <0hax@protonmail.com>

* uart: use static const uint32_t instead of #define.

Signed-off-by: 0hax <0hax@protonmail.com>

* uart: use an enum to handle parity.

Signed-off-by: 0hax <0hax@protonmail.com>

* uart: split between esp32 and esp8266.

Signed-off-by: 0hax <0hax@protonmail.com>

* uart: check_uart_settings for parity and number of data bits.

Signed-off-by: 0hax <0hax@protonmail.com>

* name param data_bits

* add new params to test

Co-authored-by: Guillermo Ruffino <glm.net@gmail.com>
2020-05-24 18:59:07 -03:00
Oskar Napieraj
4de44a99eb
Add support for ESP32 DAC (#1071)
* Add support for ESP32 onboard DAC

* Newlines

* Tests
2020-05-24 00:06:55 -03:00
Jozef Zuzelka
153aadadae
Ble scanner (#976)
* Added ble_scanner component

* ble_scanner: time.h changed to ctime

* ble_scanner: Test added.

* ble_scanner: fixed code formatting.

* Removed duplicate binary sensor tests from test2 and test3 to decrease memory requirements.

* Removed another duplicate test from test2.yaml and moved stepper test to yaml3.yaml to reduce memory requirements of test2.yaml.

* Reverted the last stepper test change

* Moved some sensor tests from test2.yaml to test3.yaml to save memory.

* Moved ruuvitag back to test2.yaml as it requires component esp32_ble_tracker.

* removed apds9960 as it is duplicated

Co-authored-by: Guillermo Ruffino <glm.net@gmail.com>
2020-05-19 21:13:50 -03:00
Jesse Hills
26d6738abb
Allow tm1637 to use pins from IO expanders (#1058)
* Allow tm1637 to use pins from IO expanders

* Add test for io expander pins
2020-05-18 19:13:29 -03:00
Niklas Wagner
39b35b79ba
Make initial run variable available to addressable_lambda (#1035)
* Make initial run variable available to addressable_lambda

* Fix linting

* Remove if clause
2020-04-28 19:24:06 -03:00
puuu
ba1222eae4
Bluetooth advertising automation (#995)
* esp32_ble_tracker: introduce UUID comparison function

* ble_presence, ble_rssi: use new UUID comparison function

* esp32_ble_tracker: introduce automation on BLE advertising

* test2.yaml: remove deep_sleep due to firmware size restrictions
2020-04-27 20:57:02 -03:00
Guillermo Ruffino
31ae337931
add lights on off triggers (#1037)
* add lights on off triggers

* add test
2020-04-25 15:39:34 -03:00
Guillermo Ruffino
6123cb7c69
add mac address to wifi info (#1030)
* add mac address to wifi info

* add test

* lint
2020-04-24 20:58:32 -03:00
Guillermo Ruffino
8040e3cf95
Climate whirlpool (#1029)
* wip

* transmitter ready

* climate.whirlpool receiver implemented (#971)

* receiver implemented

* Support for two models of temp ranges

* temperature type and lint

* more lint

Co-authored-by: Guillermo Ruffino <glm.net@gmail.com>

* add test

* not mess line endings

Co-authored-by: mmanza <40872469+mmanza@users.noreply.github.com>
2020-04-21 22:53:14 -03:00
Tim Savage
d447548893
Tests for CPP Code generation and some Python3 improvements (#961)
* Basic pytest configuration

* Added unit_test script that triggers pytest

* Changed "fixtures" to fixture_path

This is consistent with pytest's tmp_path

* Initial unit tests for esphome.helpers

* Disabled coverage reporting for esphome/components.

Focus initial unittest efforts on the core code.

* Migrated some ip_address to hypothesis

* Added a hypothesis MAC address strategy

* Initial tests for core

* Added hypothesis to requirements

* Added tests for core classes

TestTimePeriod
Lambda
ID
DocumentLocation
DocumentRange
Define
Library

* Updated test config so package root is discovered

* Setup fixtures and inital tests for pins

* Added tests for validate GPIO

* Added tests for pin type

* Added initial config_validation tests

* Added more tests for config_validation

* Added comparison unit tests

* Added repr to core.TimePeriod. Simplified identifying faults in tests

* Fixed inverted gt/lt tests

* Some tests for Espcore

* Updated syntax for Python3

* Removed usage of kwarg that isn't required

* Started writing test cases

* Started writing test cases for cpp_generator

* Additional docs and more Python3 releated improvements

* More test cases for cpp_generator.

* Fixed linter errors

* Add codegen tests to ensure file API remains stable

* Add test cases for cpp_helpers
2020-04-19 21:05:58 -03:00
Alex Reid
c1dfed5c08
feat: Add support for MCP23016 IO Expander (#1012)
* feat: Add support for MCP23016 IO extander

* fix: Fix style
2020-04-12 16:07:10 -03:00
Otto Winter
835079ad43
Add AC Dimmer support (#880)
* Add AC Dimmer support

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

* fixes

basically missed the output pin setup and in the switching was switching true true true :P

* Format

* Enable ESP32

* Also setup ZC pin

* Support multiple dimmers sharing ZC pin

* Fix ESP32

* Lint

* off gate on zc detect

* tests pins validation

* Climate Mitsubishi (#725)

* add climate

* Mitsubishi updates

* refactor mitsubishi to use climate_ir

* lint

* fix: only decode when not str already (#923)

Signed-off-by: wilmardo <info@wilmardenouden.nl>

* fix climate-ir bad merge (#935)

* fix climate-ir bad merge

* add mitshubishi test

* http_request: fix memory allocation (#916)

* http_request version fix (#917)

* PID Climate (#885)

* PID Climate

* Add sensor for debugging PID output value

* Add dump_config, use percent

* Add more observable values

* Update

* Set target temperature

* Add autotuner

* Add algorithm explanation

* Add autotuner action, update controller

* Add simulator

* Format

* Change defaults

* Updates

* Use b''.decode() instead of str(b'') (#941)

Handling of request arguments in WizardRequestHandler is not decoding
bytes and rather just doing a str conversion resulting in a value of
"b''" being supplied to the wizard code.

* Adding the espressif 2.6.3 (#944)

* extract and use current version of python 3 (#938)

* Inverted output in neopixelbus (#895)

* Added inverted output

* Added support for inverted output in neopixelbus

* Update esphome/components/neopixelbus/light.py

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

* Update light.py

* corrected lint errors

Co-authored-by: Otto Winter <otto@otto-winter.com>

* Added degree symbol for MAX7219 7-segment display. (#764)

The ascii char to use it is "~" (0x7E).

Disclaimer: I didn't test this yet.

* Fix dump/tx of 64 bit codes (#940)

* Fix dump/tx of 64 bit codes

* fixed source format

* Update hdc1080.cpp (#887)

* Update hdc1080.cpp

increase waittime, to fix reading errors

* Fix: Update HDC1080.cpp

i fixed the my change on write_bytes

* add tcl112 support for dry, fan and swing (#939)

* Fix SGP30 incorrect baseline reading/writing (#936)

* Split the SGP30 baseline into 2 values

- According to the SGP30 datasheet, each eCO2 and TVOC baseline is a 2-byte value (MSB first)
- The current implementation ignores the MSB of each of the value
- Update the schema to allow 2 different baseline values (optional, but both need to be specified for the baseline to apply)

* Make both eCO2 and TVOC required if the optional baseline is defined

* Make dump_config() looks better

* Add register_*_effect to allow registering custom effects (#947)

This allows to register custom effect from user components,
allowing for bigger composability of source.

* Bugfix/normalize core comparisons (and Python 3 update fixes) (#952)

* Correct implementation of comparisons to be Pythonic

If a comparison cannot be made return NotImplemented, this allows the
Python interpreter to try other comparisons (eg __ieq__) and either
return False (in the case of __eq__) or raise a TypeError
exception (eg in the case of __lt__).

* Python 3 updates

* Add a more helpful message in exception if platform is not defined

* Added a basic pre-commit check

* Add transmit pioneer (#922)

* Added pioneer_protocol to support transmit_pioneer

* Display tm1637 (#946)

* add TM1637 support

* Support a further variant of Xiaomi CGG1 (#930)

* Daikin climate ir component (#964)

* Daikin ARC43XXX IR remote controller support

* Format and lint fixes

* Check temperature values against allowed min/max

* fix tm1637 missing __init__.py (#975)

* Add AC Dimmer support

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

* fixes

basically missed the output pin setup and in the switching was switching true true true :P

* Format

* Enable ESP32

* Also setup ZC pin

* Support multiple dimmers sharing ZC pin

* Fix ESP32

* Lint

* off gate on zc detect

* tests pins validation

* fix esp8266 many dimmers, changed timing

* Increased value resolution, added min power

* use min_power from base class

* fix min_power. add init with half cycle

* added method for trailing pulse, trailing and leading

* fix method name. try filter invalid falling pulse

* renamed to ac_dimmer

* fix ESP32 not configuring zero cross twice

Co-authored-by: Guillermo Ruffino <glm.net@gmail.com>
Co-authored-by: Wilmar den Ouden <wilmardo@users.noreply.github.com>
Co-authored-by: Nikolay Vasilchuk <Anonym.tsk@gmail.com>
Co-authored-by: Tim Savage <tim@savage.company>
Co-authored-by: Vc <37367415+Valcob@users.noreply.github.com>
Co-authored-by: gitolicious <mrjchn@gmail.com>
Co-authored-by: voibit <krestean@gmail.com>
Co-authored-by: Luar Roji <cyberplant@users.noreply.github.com>
Co-authored-by: András Bíró <1202136+andrasbiro@users.noreply.github.com>
Co-authored-by: dmkif <dmkif@users.noreply.github.com>
Co-authored-by: Panuruj Khambanonda (PK) <pk@panurujk.com>
Co-authored-by: Kamil Trzciński <ayufan@ayufan.eu>
Co-authored-by: Keith Burzinski <kbx81x@gmail.com>
Co-authored-by: Mario <4376789+mario-tux@users.noreply.github.com>
Co-authored-by: Héctor Giménez <hector.fwbz@gmail.com>
2020-04-10 00:07:18 -03:00
kroimon
8613c02d5c
Add constant_brightness property to CWWW/RGBWW lights (#1007)
Fixes https://github.com/esphome/feature-requests/issues/460

Co-authored-by: Otto Winter <otto@otto-winter.com>
2020-04-08 09:31:23 -03:00
Evgeny
dea6675c21
Add HM3301 laser dust detection sensor (#963)
* Add HM3301 laser dust detection sensor

* Fixed after lint

* Fixed after lint

* added status clear warning
2020-04-06 14:11:41 -03:00
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