Commit Graph

255 Commits

Author SHA1 Message Date
Farzad E
2225594ee8
Added an option to disable mDNS (#1716)
* Added an option to disable mDNS

* Fixed linter issues

* Moved the enable_mdns option to WiFi and Ethernet components

* extracted common method for add mdns library

* lint

Co-authored-by: Guillermo Ruffino <glm.net@gmail.com>
2021-05-06 12:31:42 -03:00
buxtronix
02aa75f68c
BLE client support on ESP32 (#1177)
Co-authored-by: Ben Buxton <bb@cactii.net>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2021-05-03 11:10:50 +12:00
Stephen Tierney
7fb116d87d
Add support for SHT4X (#1512) 2021-04-28 20:22:46 +12:00
SenexCrenshaw
2033ac34e5
Sgp40 (#1513)
* Start of SGP40 dev

* Clean up

* Initial Commit

* VOC is working

* Fixed up sensor config

* Lint Fixes
Added in save/restore baseline
Noted original repo in header

* Lint Fixes
Added to test

* Lint Fixes

* Added additional check on restoring

* Removed double check

* Changed defines to static const double

* Changed defines to const
Do not send voc index until sensor stabilizes

* Fixed sensor stabilization message

* Fixup according to PR

* samples_read increment fix

* Fixed missing device class

* Choose a SENSOR device class

* Moved some sensors for tests

Co-authored-by: Guillermo Ruffino <glm.net@gmail.com>
2021-04-08 22:40:19 -03:00
Stanislav Meduna
808e3be324
Add the display.is_displaying_page condition (#1646)
* display: add the display.is_displaying_page condition

* use maybe_simple_value for page_id

* add test
2021-04-02 23:00:41 -03:00
Andreas Hergert
9e23987db8
Add I2CMultiplexer in generel and the TCA9548A in special (#1410)
* Added I2CMultiplexer in generel and the TCA9548A in special

* cleanup

* tidy

* tidy

* tidy

* tidy

* Update CODEOWNERS

* Update CODEOWNERS

* added CODEOWNERS

* Fix CODEOWNERS

* protected function

* fixed scan

* fixed style

* added to test1.yaml

* Update esphome/components/tca9548a/__init__.py

* Update esphome/components/i2c/__init__.py

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

* Update esphome/components/i2c/i2c.cpp

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

* Update esphome/components/i2c/__init__.py

* Update esphome/components/i2c/__init__.py

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

* Update esphome/components/i2c/i2c.cpp

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

* added define statements for I2C Multiplexer

* fix

* try to tidy

* bug fix

* tidy

* override fix

* only change channel if different

* tidy

* added test

* testfix

* added defines

* tidy

* fix dep

* like recommended

Co-authored-by: Andreas Hergert <andreas.hergert@otrs.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
Co-authored-by: Guillermo Ruffino <glm.net@gmail.com>
2021-03-29 16:50:30 -03:00
Jesse Hills
4d340dc029
Merge branch 'dev' into bump-1.17.0b1 2021-03-22 20:08:57 +13:00
Jesse Hills
af3273d930
Add trigger for http actions to receive the status code (#1599) 2021-03-22 16:26:10 +13:00
Niccolò Maggioni
8f1eb77e05
Background calibration & ABC commands for SenseAir S8 (#1623) 2021-03-22 12:59:41 +13:00
matikij
91898cb814
Add 2.13in-ttgo-b1 waveshare epaper module. (#1326) 2021-03-20 20:32:46 +13:00
Steve Baxter
a77784a6da
Implement pulse_meter as an improvement on pulse_counter and pulse_width for meters (#1434) 2021-03-19 21:16:27 +13:00
Sergey V. DUDANOV
f34c9b33fc
Midea climate support (#1328)
* Added support for Midea IoT climate devices via UART interface (USB-dongle)

* Fixed lint checks

* Fixed lint checks

* CODEOWNERS update

* Clang-format

* Clang-format

* Add network device notification message support (show WiFi sign on devices)

* Make wifi_signal_sensor optional component

* Some optimization

* Optimizations and code formatting

* Fixed lint checks

* Fixed lint checks

* Fixed sign error

* Code changes

* Network notify repeat every 10 min

* Added log messages

* Fixed lint checks

* Refactoring: MideaClimate => MideaAC

* Using enums instead literals in Midea states

* Enum changed to be more correct

* Shrink notify frame to 32 bytes

* Fixed lint checks

* Change notify frame appliance type to common broadcast

* Control optimization

* Fixed control error

* Control command now don't reset others uncontrollable properties of device

* Fixed lint checks

* Some optimization

* on_receive callback give const Frame

* Fix control

* Fixes

* Some minor changes

* Fixed lint error

* No dependency from wifi_signal sensor for stretched WiFi icon. New option: stretched_icon instead wifi_signal_id.

* Fix option name

* Added export of outdoor temperature as sensor value

* Fixed lint errors

* Fixed pylint error

* Minor fix

* Fix temperature overflow in some cases

* Added answer on QueryNetwork command from appliance. Now don't wait for ack on 0x0D command.

* Fix lint error

* Added humidity setpoint optional sensor

* Added boolean options 'swing_horizontal' and 'swing_both'

* Added debug frame output

* Added debug frame output

* Fix lints error

* Some debug output optimization

* Fix lint check

* Some code optimization: adding templates

* Fix lint error

* Added sensors device classes

* Python code reformatted with black formatter

* RX frame debug message

RX frame debug message now prints before checking

* Remove CRC check for receiving frames

* Added experimental power usage option

* Added power usage option

* Fixed lint errors

* Major changes. See esp-docs.

* Added tests in test4.yaml

* Added tests in test1.yaml

* Added wifi dependency

* Fix test1.yaml

* Some fix :)

* One more refactoring

* One more refactoring

* One more refactoring
2021-03-17 17:27:50 -03:00
Jesse Hills
faf577a9dd
Add option to suffix name with mac address (#1615)
* Add option to suffix name with mac address

* Rename and add to test file
2021-03-17 17:22:48 -03:00
Jim Ekman
7708b81ef5
Support fan speed levels (#1541)
* Add fan speed percentage support to the API

* Add float fan speed percentage

* Add percentage support to automation and configuration

* Update Tuya fan

* Fix pylint warning

* Update API to use speed levels instead of percentage

* Use speed levels

* Fix type warnings

* MQTT component now converts between speed levels and enums

* Webserver now supports speed_level

* Update prometheus

* Remove low/medium/high settings from speed fan

* Remove unused enum

* Configurable speed levels for speed fan

* Remove unused import

* Rename speed_level->speed and speed_levels->speed_count

* Rename supported_speed_levels -> supported_speed_count in API and FanTraits

Field id stays the same in the protocol, so the change is not breaking for aioesphome.
2021-03-17 10:40:02 -03:00
Guillermo Ruffino
d5cf4b7eac
Improve error checking: too many component id candidates (#1570)
* add error too many candidates

* Improve error checking of ids
2021-03-07 19:59:32 -03:00
Jesse Hills
570ec36fe3
MCP23XXX Refactor (#1560)
* Refactor MCP23XXX classes to consolidate shared code

* Update test mcp23xxx pin schemas
2021-03-07 16:23:54 -03:00
needspeed
0f151a8f6b
Extend 'uart:' with 'invert:' for esp32 (#1586) 2021-03-06 10:25:07 -03:00
Gabe Cook
88b46b7487
Add min/max filters (#1569) 2021-03-05 10:10:06 -03:00
Moritz Glöckl
8e93735861
Add support for the SM300D2 7-in-1 sensor module (#1524)
* Added support for SM300D2 sensor module

* Fixed lint errors due to added tvoc config

* add device class

Co-authored-by: Guillermo Ruffino <glm.net@gmail.com>
2021-03-02 21:54:52 -03:00
SenexCrenshaw
ac25b138f5
Migrate ESPColor to Color (#1551)
* Migrate ESPColor to Color

* color.h constructor fix

* Updated componets to use Color
Added a using for ESPColor

* Lint fixes

* Fixed value error

* Update display components to use colorutil

* Updated to latest PR comments

* Fixed COLOR_WHITE

* Moved esp_scale to color_utils

* Rename color_utils to display_color_utils
2021-03-02 11:08:57 -03:00
Seppel Hardt
bdf004867d
Added samsung36 ir protocol (#1438)
* Added samsung36 ir protocol

* Make linter happy

* Added test and fixed python failure

* Sorry for the commits but linter was still not happy :)

* Okay have to run  script/clang-format -i

Co-authored-by: tuxBurner <tuxBurner@boggo.de>
2021-02-27 20:16:27 -03:00
Gabe Cook
08ecca86bc
Add send_every to uart switch for recurring data (#1514) 2021-02-27 19:53:53 -03:00
Kris
a925036ff8
Added Waveshare 2.90inch V2 e-ink display (#1538) 2021-02-20 19:29:52 +13:00
Guillermo Ruffino
25924ca4e8
fix substitution losing track of document range (#1547) 2021-02-19 21:52:42 -03:00
Kris
c92c439d17
Added Waveshare 2.90inch V2 e-ink display (#1538) 2021-02-18 07:12:02 +13:00
SenexCrenshaw
a342302114
st7735_conf_fixes (#1530) 2021-02-14 02:21:43 -03:00
Keith Burzinski
65c7e27a43
MCP230xx open drain interrupt pins (#1243) 2021-02-14 10:01:21 +13:00
Frank Bakker
57b56010da
Added energy sensor to hlw8012 (#1198) 2021-02-14 10:01:21 +13:00
Keith Burzinski
b52f7cfe86
MCP230xx open drain interrupt pins (#1243) 2021-02-13 22:07:11 +13:00
Frank Bakker
81b512a7b3
Added energy sensor to hlw8012 (#1198) 2021-02-13 21:57:06 +13:00
Jérémy JOURDIN
04d8593f38
Add MCP4725 DAC Component (#1418)
* Add MCP4725 DAC

* Fix lint

* Fix lint

* Fix lint

* Lint & cleanup

* Lint again

* One more lint

* add test

Co-authored-by: Guillermo Ruffino <glm.net@gmail.com>
2021-02-06 12:18:48 -03:00
Florian Mösch
e2ad6fe3d8
rename read/write to read/time/write_time (#1468) 2021-01-26 13:39:42 +13:00
Florian Mösch
6781d08c9b
time sync notification (#1442)
* add on_time_sync trigger

* cleanup lint

* fix review remark (sntp didn't trigger callbacks)
2021-01-26 13:39:42 +13:00
Guillermo Ruffino
52c67d715b
add http request tests (#1448)
* add http request tests

* add to test3 for esp8266

* move test action to another trigger
2021-01-23 19:44:20 -03:00
Florian Mösch
b28735d63b
rename read/write to read/time/write_time (#1468) 2021-01-18 09:35:35 -03:00
Florian Mösch
4c105398f7
time sync notification (#1442)
* add on_time_sync trigger

* cleanup lint

* fix review remark (sntp didn't trigger callbacks)
2021-01-18 09:34:50 -03:00
SenexCrenshaw
28f2582256
Updated Mcp3008 to support reference_voltage and voltage_sampler::VoltageSampler (#1387)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2021-01-17 17:06:37 +13:00
Florian Mösch
652f6058d1
make time components polling components (#1443)
* make real time clock components polling components

* add test
2021-01-17 17:06:37 +13:00
Guillermo Ruffino
717aab7c8b
Add rc522 i2c (#1432)
* split to spi and i2c

* fix binary_sensor

* i2c comms ready

* fix rc522_spi binary sensor compat

* lint

* lint

* add test and codeowners

* fix refactor
2021-01-17 17:06:37 +13:00
SenexCrenshaw
36089a1400
Updated Mcp3008 to support reference_voltage and voltage_sampler::VoltageSampler (#1387)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2021-01-14 07:33:19 +13:00
Florian Mösch
bf453ad8cd
make time components polling components (#1443)
* make real time clock components polling components

* add test
2021-01-12 15:37:22 -03:00
Guillermo Ruffino
fbc1b3e316
Add rc522 i2c (#1432)
* split to spi and i2c

* fix binary_sensor

* i2c comms ready

* fix rc522_spi binary sensor compat

* lint

* lint

* add test and codeowners

* fix refactor
2021-01-12 10:13:53 -03:00
Florian Mösch
dcd3d2084d
DS1307 real time clock component (#1441)
* initial support for DS1307 real time clock

* add simple test, make sync functions public

* cleanup lint

* add sync to/from rtc actions

* changes action names

* Update esphome/components/ds1307/ds1307.cpp

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

* Update esphome/components/ds1307/time.py

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

* fix suggested change

Co-authored-by: Guillermo Ruffino <glm.net@gmail.com>
2021-01-11 20:10:35 +13:00
Florian Mösch
699696e8d1
DS1307 real time clock component (#1441)
* initial support for DS1307 real time clock

* add simple test, make sync functions public

* cleanup lint

* add sync to/from rtc actions

* changes action names

* Update esphome/components/ds1307/ds1307.cpp

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

* Update esphome/components/ds1307/time.py

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

* fix suggested change

Co-authored-by: Guillermo Ruffino <glm.net@gmail.com>
2021-01-08 19:40:22 -03:00
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Nicholas Peters
714d28a61a
Add TMP117 component (#992)
* Create TMP117 sensor component
2020-03-12 14:25:00 -07:00
Derek Hageman
11b727fdf7
SCD30 fixes and improvements (#962)
* SCD30 improvements
2020-03-11 17:39:40 -07: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