Commit graph

274 commits

Author SHA1 Message Date
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
Kurt Kellner
b91723344e
Vl53l0x change address (#1126)
* Added vl53l0x change address and timeout

* Added vl53l0x change address and timeout

* vl53l0x code cleanup and update test

* remove executable bit

* lint code cleanup

* code review fixes including timeout default to 10ms

* Code review cleanup and change a WARN log level message to DEBUG

* Fix issue where warn should be temporary

* Added name of sensor to warning message

* Fix blacklist lint issue

* Remove unused import
2021-02-25 19:12:06 -03:00
spilin
3d0310d0e0
Add dial support for sim800l component (#1558) 2021-02-25 18:11:15 -03: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
Chris Nussbaum
dce20680d7
Add duration option to action start deep sleep (#1526) 2021-02-15 14:32:22 -03:00
marecabo
f95be6a0df
Device class attribute for sensor component (#1525)
* Add constants for sensor device_class

* Add device_class attribute to sensor component

* Add device_class attribute to sensor class

* Add device_class to mhz19 temperature sensor

* Add device_class to sensor in api component

* Add test for device_class of sensor

* Rename DEVICE_CLASS_NONE to DEVICE_CLASS_EMPTY for consistency

* Make optional attributes of sensor component truly optional
2021-02-15 12:49:02 -03:00
SenexCrenshaw
a342302114
st7735_conf_fixes (#1530) 2021-02-14 02:21:43 -03: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
fkirill
de3377132d
Adding support for the Inkbird IBS-TH1 Mini sensor (#1099) 2021-02-06 17:04:47 +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
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
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
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