Commit Graph

292 Commits

Author SHA1 Message Date
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
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
Nick Whyte
74aca2137b Add duty cycle output component (#894)
* Add duty cycle output component

* cleanup + tests

* format

* duty_cycle -> slow_pwm

* .

* clang-format

* ESP_LOGD -> ESPLOGVV

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

* Update tests
2019-12-04 16:47:34 +01:00
Evgeny
31d964c16a Add TM1561 support (#893)
* Add TM1561 support

* Fixed after clang-tidy

* Fixed after clang-tidy

* Fixed after clang-tidy, updated lib_deps

* Fixed after clang-tidy, updated formatting

* Added actions, removed from display domain

* Protected methods naming

* float casting

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

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

* Fix code formatting;


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

* add climate tests
2019-12-03 11:50:06 -03:00
Tim P
fa1adfd934 Add QMC5883L Sensor + Improvements to HMC5883L (#671)
* Add QMC5883L and Updated HMC5883L

* add tests

* changed to oversampling

* fix pylint

* fix private method

* typo fix

* fix protected method

* Clean up code and PR recomendations

* fix tests

* remote file

* fix qmc oversampling unit

* Remove hmc5883l config logging

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

* Changes for validate_enum

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

* Remove unused constant

* Remove duplicate tests

* Repeat remove config print

* remove changes to test2 since bin is to large

* Add comment to HMC5583L


Co-authored-by: Timothy Purchas <timothy@TPF.local>
Co-authored-by: Otto Winter <otto@otto-winter.com>
2019-11-26 18:43:11 +01:00
John
6a0268b852 fix chip_temperature for atm90e32 component (#865)
* Added more data to atm90e32 component

* ignore

* correction

* Delete 6chan_energy_meter.yaml

* PR request changes

* repository test branch

* Update setup.py

* Update const.py

* delete test yaml

* fix chip_temperature_sensor

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

* default

* Update test1.yaml
2019-11-20 17:47:34 +01:00
Mark
092bca0d63 Atm90e32 pf fix (#841)
* correct set_pf_sensor to set_power_factor_senor

* remove junk files added in error

* correct sensors.yaml reference to set_reactive_power

* Fixes
2019-11-13 08:49:59 +01:00
Sergio
a919b015b4 Add support for INA226 Current/Power Monitor (#801)
* Add support for INA226 Current/Power Monitor

* fix lint errors

* fix narrowing conversion

* Remove useless code


Co-authored-by: Sergio Muñoz <sergio@iMac-de-Sergio.local>
2019-11-06 13:59:00 +01:00
DAVe3283
f94e9b6b1e Add MAX31865 sensor support, fix MAX31855 sensor (#832)
* Add MAX31865 sensor support, fix MAX31855 sensor.

# MAX31865

Added support for the MAX31865 RTD-to-Digital Converter to measure PT100 and
similar RTDs. Verified with an Adafruit unit (product ID: 3328) and a PT100
probe.

# MAX31855

This was setup for incorrect SPI clock polarity and phase, and would return bad
data due to a race condition measuring on the wrong edge (verified with Saleae
Logic scope). Selecting the correct configuration fixes that problem.

Re-wrote the decode off the datasheet to handle error states better (sends NaN
as an update on failure to read temperature, which shows the value as Unknown
in Home Assistant).

Added the *optional* ability to monitor the internal high-precision temperature
sensor, which can be nice in some applications.

* Tests for MAX31855/MAX38165.

* Update style to match project rules.

Also fix CONF_REFERENCE_RESISTANCE and CONF_REFERENCE_TEMPERATURE being defined
multiple places. Missed this when I added them to const.py.

* Update style to match project rules.

Pylint line limit 101/100 ("missed it by that much").
Also apparently I can't read and patched the wrong line in max31855.cpp.

* Minor string/style cleanup.

There was a copy-paste leftover in max31855.cpp and max31865/sensor.py had
unnecessary whitespace.

* Improve MAX31865 fault detection and logging.

Log levels are more in-line with the documented descriptions.

Fault detection code is improved. A transient fault between reads is still
reported, but now only faults *during* a read cause the sensor to fail and
return NAN ("unknown" in Home Assistant).

* Update style to match project rules.

I just now realized the .clang-format and pylintrc files are included. D'oh!

* MAX31855 & MAX31865 code style alignment.

@OttoWinter caught some style mismatches, updated to match project better.

* Fix a lost '\' in max31865/sensor.py.
2019-11-06 13:56:43 +01:00
Otto Winter
b0bb692af4
AS3935 Use normal pin polling for IRQ (#805)
* AS3935 Use normal pin polling for IRQ

See also https://github.com/esphome/feature-requests/issues/452

* Fix tests
2019-10-27 12:30:19 +01:00
Otto Winter
ae8700447e
Add sensor force_update option (#783)
* Add sensor force_update option

* Add test
2019-10-21 15:46:39 +02:00
Otto Winter
4fa11dfa68
Lint 2019-10-19 21:59:55 +02:00
Nad
18426b71e4 Add support for STS3x Temperature sensors (#669)
* Add support for Sensirion STS3x Temperature sensors

* Removed humidty reading from STS3x sensor

* Fixed line error and operand error

* Fixed syntax

* Add test snippet for STS3x sensor

* Clean up

* #550 Proactive fix for STS3x component reporting WARNING status and reinitialzing similar to SHT3xd

* Flattened config.

* Fixed missing temperature unit

* Code formatting

* Added marking for future commands

* Cleanup

* Removed whitespace

* Cleanup

* Cleanup
2019-10-19 21:31:37 +02:00
Nad
7063aa6009 Add support for SHTCx Temperature sensors (#676)
* Add support for Sensirion STS3x Temperature sensors

* Removed humidty reading from STS3x sensor

* Fixed line error and operand error

* Fixed syntax

* Add test snippet for STS3x sensor

* Clean up

* Add support for Sensirion SHTC1 and SHTC3 Temperature sensors

* Fixed the test

* Fix lint issues

* Update esphome/components/shtcx/shtcx.cpp

Good point.

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

* Refactored device type identification and logging

* Refactoring and cleanup

* Remove sts3x


Co-authored-by: Otto Winter <otto@otto-winter.com>
2019-10-19 21:31:27 +02:00
Nad
286ca07cc8 Add support for SGP30 eCO2 and TVOC sensors (#679)
* Add support for SGP30 eCO2 and TVOC sensors

* Added test for SGP30

* Lint issues fixed

* Lint fixes

* Fixed light lengths

* Cleanup

* Add support for Sensirion SCD30 CO2 sensors

* Fixed few lint issues

* Lint fixes

* Fixed line ending for lint

* Cleanup

* Refactored float conversion

* Refactor unnecessary return

* Refactoring and cleanup

* Updated uptime_sensor_ referencing and simplified checking on availability of copensation

* Temperature and Humidity source moved to a separate compensation block; Dependency for Uptime sensor removed.

* Both humidity_source and temperature_source are now mandatory if the compensation block is defined;

* Clean up

* Cleanup

* Cleanup in search of perfection

* Use correct comment style


Co-authored-by: Otto Winter <otto@otto-winter.com>
2019-10-19 21:21:07 +02:00
Evan Coleman
58b6311821 Add SSD1325 Display Component (#736)
* add ssd1325 component

* fix i2c

* remove ssd1325 i2c

* add test

* set max contrast

* No macros - see styleguide

* Remove invalid function

* Formatting


Co-authored-by: Otto Winter <otto@otto-winter.com>
2019-10-19 20:44:43 +02:00
Otto Winter
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
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
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
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
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
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
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
Otto Winter
4323ca88c3
Add test for automation light effect 2019-05-27 19:35:36 +02:00
Otto Winter
83fa51a580
GPS time source (#543)
* GSP Time

* GPS Time

* Lint

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

* Move define, add test

* Remove sun artifact

* Lint

* Lint
2019-05-13 13:06:14 +02:00
Otto Winter
f811b1157c
Updates for 1.13 (#546)
* Update CI matcher

* Check Executable bit

* Quicklint

* Updates

* Allow pm1.0 and pm10.0 for PMS5003ST

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

* PowerSupplyRequester

* Lint

* Include debug data in generated main.cpp

* Updates

* Auto-select bit_depth

* Updates
2019-05-12 23:04:36 +02:00
Otto Winter
8e75980ebd
Cleanup dashboard JS (#491)
* Cleanup dashboard JS

* Add vscode

* Save start_mark/end_mark

* Updates

* Updates

* Remove need for cv.nameable

It's a bit hacky but removes so much bloat from integrations

* Add enum helper

* Document APIs, and Improvements

* Fixes

* Fixes

* Update PULL_REQUEST_TEMPLATE.md

* Updates

* Updates

* Updates
2019-04-22 21:56:30 +02:00
Otto Winter
6682c43dfa
🏗 Merge C++ into python codebase (#504)
## Description:

Move esphome-core codebase into esphome (and a bunch of other refactors). See https://github.com/esphome/feature-requests/issues/97

Yes this is a shit ton of work and no there's no way to automate it :( But it will be worth it 👍

Progress:
- Core support (file copy etc): 80%
- Base Abstractions (light, switch): ~50%
- Integrations: ~10%
- Working? Yes, (but only with ported components).

Other refactors:
- Moves all codegen related stuff into a single class: `esphome.codegen` (imported as `cg`)
- Rework coroutine syntax
- Move from `component/platform.py` to `domain/component.py` structure as with HA
- Move all defaults out of C++ and into config validation.
- Remove `make_...` helpers from Application class. Reason: Merge conflicts with every single new integration.
- Pointer Variables are stored globally instead of locally in setup(). Reason: stack size limit.

Future work:
- Rework const.py - Move all `CONF_...` into a conf class (usage `conf.UPDATE_INTERVAL` vs `CONF_UPDATE_INTERVAL`). Reason: Less convoluted import block
- Enable loading from `custom_components` folder.

**Related issue (if applicable):** https://github.com/esphome/feature-requests/issues/97

**Pull request in [esphome-docs](https://github.com/esphome/esphome-docs) with documentation (if applicable):** esphome/esphome-docs#<esphome-docs PR number goes here>

## Checklist:
  - [ ] The code change is tested and works locally.
  - [ ] Tests have been added to verify that the new code works (under `tests/` folder).

If user exposed functionality or configuration variables are added/changed:
  - [ ] Documentation added/updated in [esphomedocs](https://github.com/OttoWinter/esphomedocs).
2019-04-17 12:06:00 +02:00
Otto Winter
7fd5634a51
Add cover position/tilt support (#496)
* Add climate support

* Fixes

* Updates

* Updates

* Add ota

* Remove climate changes

* Lint
2019-04-08 18:08:58 +02:00
Otto Winter
de51bdda5b
Fix filter_out: nan filer (#486)
* Fix filter_out nan filter

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

* Add test
2019-03-18 15:07:20 +01:00
puuu
23df5d8af7 Support SDS011 component. (#467)
* Support SDS011 component.

* improve if condition

* Check update interval is multiple of minute

* do not allow update intervals longer than 30 min

* fix sensor schema name

* remove query_mode

* Warn if rx_only mode used together with update interval

* Allow update intervals below 1min

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

* Use update interval in minutes

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

* Lint

* Fix register

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

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

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

* Add tests

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

* Remove filter_nan

* Add test
2019-02-26 19:38:39 +01:00