* Add api missing_state attribute
Fixes https://github.com/esphome/issues/issues/828
Adds a new property for missing state, so that HA can now when a sensor does not have a state yet.
* Update api.proto
* implemented ruuvi_ble and ruuvitag with RAWv1 protocol
fixesesphome/feature-requests#313
* lint
* updated data calculations
* cpp lint
* use string directly in message
Co-Authored-By: Otto Winter <otto@otto-winter.com>
* add RAWv2 protocol support
* fix ICON_SIGNAL
* typo
* calculation correction and cleaning
* c++ lint
* added acceleration and fixed typo
* removed remote_receiver to reduce firmware size
remote_receiver also in test1.yaml
* 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.
* new Fujitsu-General climate component
* Refactor out climate_ir
CC @glmnet
Refactored out climate_ir python files too.
Fixed invalid namespace name for climate_ir.
* Add namespace lint check
* Refactor Fujitsu Climate to climate_ir
Co-authored-by: Otto Winter <otto@otto-winter.com>
* web_server_base AUTO_LOAD includes ASYNC_TCP
fix AUTO_LOAD of web_server_base to include ASYNC_TCP
* Remove from dependencies
Co-authored-by: Otto Winter <otto@otto-winter.com>
* 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
* 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>
* 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>
* 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>
* add support for climate action:
Following hass implementation of climate, action represents the current action the climate device is perfoming, e.g. cooling or heating
fix bang_bang climate:
make sure that the thresholds are always respected.
fixes the issue where the component would just keep on heating, regardless of the temperature range
* Updates
- Use dedicated enum for action (otherwise it gets confusing because "auto" is not a valid action)
- Add field to tell HA that action is supported
- Revert semantic changes in bang_bang
* Conditional print
Co-authored-by: Otto Winter <otto@otto-winter.com>
* add ClimateIR
* update climate ir
* update class comment
* lint
* moved to climate_ir
* fix include path
* use climateir
* updates
* update include path
* lint
* fixed variable assigned to itself
I'm facing some occasional timeouts when reading BME280.
Looking at Adafruit driver (that this code is based on), I see that base math is using 1.25ms, increased by 2.3*oversampliing + 0.575 for each value being read.
I've added 1.5ms as baseline, to be on the same safe.
* Add support for TTGO ePaper module
Use 2.13in-ttgo as type. Only different LUTs were needed, everything else is the same.
relates to issue #233.
* fix styling errors
* styling fixes
Co-authored-by: null <mandy.klingbeil@student.hpi.uni-potsdam.de>
* refactored xiaomi sensors
* fix lint
* fixed and added tests
* fix namespace
* LYWSD02 has no battery level
* fixed enum
* fix
* fix case
* fix spaces in empty line...
* inform users of old sensors about the change
* Fix for PCF8574 output chattering at the start/reboot
* Fix for PCF8574 output chattering at the start/reboot
* Fix for PCF8574 output chattering at the start/reboot
Co-authored-by: Amish Vishwakarma <vishwakarma.amish@gmai.com>
* 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
* added ANALOG_OUTPUT as first functionality
* added gpio
* seperated the code for different functions
* fixed code
* Revert "fixed code"
This reverts commit 0c6eacb225.
* add timings for breathe and blink
* made the sx1509_float_output am output component
* add keypad
* implementation for sx1509 keypad
* keypad code cleanup and first device tests
* debounce
* keypad working now.
* update for timings.
does not compile yet
* added all options for breathe and blink
fixed var namings
* blink and breath still not ok
* fixed ms for timings
* sync with repo
* fixed issue with gpio pin output
* code cleanup
* lint
* more lint
* remove log from header
* Update esphome/components/sx1509/__init__.py
Co-Authored-By: Otto Winter <otto@otto-winter.com>
* review
* feedback
* fixed review issues
did some extended testing with mqtt spy
* code cleanup (comments)
* fixed row col swap for binarysensor_keypad
* flake and lint
* travis
* travis
* travis
* Update esphome/components/sx1509/sx1509.cpp
Co-Authored-By: Otto Winter <otto@otto-winter.com>
* review
* separated platforms
* code cleanup
* travis relative paths in python
* remove blink/breathe
code cleanup
* cpp lint
* feedback
* travis
* lint line to long
* check keypad settings to be valid
* clang
* keypad config
* text
* Remove wrong .gitignore from .gitignore
* Remove .pio folder from .gitignore (merge)
* Formatting
* Formatting
* Add i2c log in dump_config
* Remove unused variables
* Disable static for header files
We don't need internal linkage
* Use consistent member default argument style
* Run clang-format
Co-authored-by: null <m.vanturnhout@exxellence.nl>
Co-authored-by: Otto Winter <otto@otto-winter.com>
* Basic auth
* Test
* Linter fix
* Make username/password strict strings
Reason: passwords only consisting of digits (012345) will be silently converted (to "12345")
Co-authored-by: Otto Winter <otto@otto-winter.com>
* add nexa remote support.
This is inspired by: https://github.com/sui77/rc-switch/pull/124
As described there: "The remotes sold in ClasOhlson in scandinavia have
a slightly longer sync sequence(added a skip pulse field in the
protocol) and a 64 bit code word. Part of the code gets lost but that
seems to be OK until support for 64 bit codes is added."
* add default value to ctor
* allow 64bit codes
* lint
* make vars 64 bits
* add has built in endstop
* rewrite as proposed
* Update esphome/components/time_based/time_based_cover.h
Co-Authored-By: Otto Winter <otto@otto-winter.com>
* lint
* Re trigger stop_operation if stop called
* allow se triggering open/close command if safe
* using COVER_OPEN/CLOSE constants
* add xiaomi BLE Thermometer lywsd02 model support
* remove battery level
* Update sensor.py
to pass the lint test
https://github.com/esphome/esphome/pull/664
* fix trailing space
Co-authored-by: Guoxue <gx@m15.cn>
Co-authored-by: mr G1K <mr@g1k.ru>
* 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
* Fix mqtt_text_sensor to honor unique_id when set.
* Remove setting of unique_id in json tree, as the mqtt_component already does this, and in fact overrides what we do here.
* Add unqiue_id() and dump_config() to the wifi_info sensors.
* Erase all flash for USB uploads on ESP8266s
Previously, only erased "write regions".
Downside: Config for other FWs like tasmota could be affected
Upside: Potentially fixes some ESP8266 connection issues
Related: https://github.com/esphome/issues/issues/455#issuecomment-503524479
* Clear WiFi settings for ESP8266
Clears wifi settings from retained storage on ESP8266 (if set).
Unsure if this is the actual issue, but it won't cause problems either.
* Update wifi_component_esp8266.cpp
* Revert erase chip for testing
* Improve wait_time calculation
* 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
* 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>
* Enabling tilt control in the template cover
Added test
Add tilt option to publish action
* Added CONF_TILT to alidation schema per comment
* Removed default for CONF_TILT
* 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>
* Added scan_length to AddressableScanEffect (allow more than one LED)
* Added check for scan length being longer than addressable light
* Added config option 'scan_length' to AddressableScanEffect (default: 1)
* Renamed scan_length to scan_width, removed erroneous length check
* Fixed indentation issue in addressable_light_effect.h
Co-Authored-By: Otto Winter <otto@otto-winter.com>
* clear and disable editor while fetching contents
* semicolon
Co-Authored-By: Otto Winter <otto@otto-winter.com>
* semicolon
Co-Authored-By: Otto Winter <otto@otto-winter.com>
* Add backlight handling for lcd_pcf8574
Switch the backlight on or off by calling id(mydisplay).backlight()
or id(mydisplay).no_backlight() in lamda functions (assuming mydisplay
is the custom id for the LCD).
* Use abstract method
Co-authored-by: Attila Darazs <attila@darazs.com>
Co-authored-by: Otto Winter <otto@otto-winter.com>
* Add CT Clamp component
* Update lint
* Some more fixes
* Make updates to work as an analog sensor consumer
* Remove unused imports
Update lint suggestions
* Move setup_priority to header
* Remove unused calibration value
* Remove Unique ID
- Will be auto generated
* Update to use loop and not slow down main loop
Co-authored-by: Otto Winter <otto@otto-winter.com>
* added download, edit and retry buttons to upload modal
* changed hide for disabled, resorted buttons
* moved upload action buttons to menu
* button changes
moved edit button from menu in upload modal
swapped validation button for upload in edit modal
* add binary_sensor_map c code
* add python file
* fixed python and C++ code for new framework
* renamed add_sensor to add_channel
* travis
* Updates
- Use struct for channels_ array - heap allocation is not really necessary here.
- any_active can also be written as mask != 0
- Update setup priority to DATA
- Use shorter TAG (name is already long; not important)
- Quotes around name
- Add icon to sensor
- Use new cv.typed_schema
- Change CONF_CHANNEL to CONF_BINARY_SENSOR - makes it clearer that this option accepts a binary sensor (and not for example an int)
- Add test
Co-authored-by: Otto Winter <otto@otto-winter.com>
Fixes https://github.com/esphome/issues/issues/307
Only enters deep sleep mode when node turns off - not between updates because entering+exiting deep sleep takes some time (could be added later)
* added link from dashboard to web server, if configured
* linter fixes
* simplified integration lookup
* included loaded_integration in storage json
* included loaded_integration in storage json
* fixed loaded_integrations
plus linter changes
* fixed comment: List
Co-Authored-By: Otto Winter <otto@otto-winter.com>
* return empty list
Co-Authored-By: Otto Winter <otto@otto-winter.com>
* convert to list
Co-Authored-By: Otto Winter <otto@otto-winter.com>
* default to empty list on missing loaded_integrations
Co-Authored-By: Otto Winter <otto@otto-winter.com>
* None check no longer needed
Co-Authored-By: Otto Winter <otto@otto-winter.com>
* None check no longer needed
Co-Authored-By: Otto Winter <otto@otto-winter.com>
* removed newline
* 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>