kahrendt
afc848bf22
Add Bayesian type for binary_sensor_map component ( #4640 )
...
* initial support for Bayesian type
* Cast bool state of binary_sensor to uint64_t
* Rename channels to observations with Bayesian
* Improve/standardize comments for all types
* Use black to correct sensor.py formatting
* Add SUM and BAYESIAN binary sensor map tests
* Remove unused variable
* Update esphome/components/binary_sensor_map/binary_sensor_map.cpp
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
---------
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-04-13 01:48:29 +00:00
kahrendt
28534ecc61
Binary map bugfixes ( #4636 )
...
* limit configuration to 64 binary sensors to match code limitation
* remove superfluous debug logging
* improve state publishing logic eliminating NAN being sent on boot in certain cases
* adjust type for bitmask shift to match mask variable type
2023-03-31 04:27:24 +00:00
Jesse Hills
9273e3775b
Add vector includes ( #4080 )
2022-11-24 13:12:55 +13:00
Fabian Berthold
acd55b9601
Add sum type to binary_sensor_map ( #3541 )
2022-08-31 16:52:16 +12:00
Jesse Hills
3b8bb09ae3
Add class as first positional arg to sensor_schema ( #3216 )
2022-02-18 10:27:20 +13:00
Otto Winter
5c65f9f9ad
Convert sensor_schema to use kwargs ( #2094 )
...
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2021-08-01 12:21:32 +02:00
Stefan Agner
501f88ca86
Avoid non-const globals and enable clang-tidy check ( #1892 )
2021-06-11 08:19:44 +12:00
Franck Nijhof
11fb54c74e
Add support for Sensor state class ( #1835 )
...
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2021-06-03 13:49:56 +12:00
Otto Winter
2376a2c941
Convert components to async-def syntax ( #1821 )
2021-05-24 10:58:29 +02:00
Guillermo Ruffino
69879920eb
add-black ( #1593 )
...
* Add black
Update pre commit
Update pre commit
add empty line
* Format with black
2021-03-07 16:03:16 -03:00
marecabo
520c4331e3
Add default device classes to sensor components ( #1533 )
...
* Add device_class arg to homeassistant sensor_schema call
* Add device_class arg to mqtt_subscribe sensor_schema call
* Add device_class arg to dht sensor_schema call
* Add device_class arg to dht12 sensor_schema call
* Add device_class arg to am2320 sensor_schema call
* Add device_class arg to atc_mithermometer sensor_schema call
* Add device_class arg to atm90e32 sensor_schema call
* Add device_class arg to bh1750 sensor_schema call
* Add device_class arg to ble_rssi sensor_schema call
* Add device_class arg to bme280 sensor_schema call
* Add device_class arg to bme680 sensor_schema call
* Add device_class arg to bmp085 sensor_schema call
* Add device_class arg to bmp280 sensor_schema call
* Add device_class arg to binary_sensor_map sensor_schema call
* Add device_class arg to apds9960 sensor_schema call
* Add device_class arg to as3935 sensor_schema call
* Add device_class arg to ccs811 sensor_schema call
* Add device_class arg to cse7766 sensor_schema call
* Add device_class arg to ct_clamp sensor_schema call
* Add device_class arg to dallas sensor_schema call
* Add device_class arg to duty_cycle sensor_schema call
* Add device_class arg to esp32_hall sensor_schema call
* Add device_class arg to hdc1080 sensor_schema call
* Add device_class arg to hlw8012 sensor_schema call
* Add device_class arg to hm3301 sensor_schema call
* Add device_class arg to hmc5883l sensor_schema call
* Add device_class arg to htu21d sensor_schema call
* Add device_class arg to hx711 sensor_schema call
* Add device_class arg to ina219 sensor_schema call
* Add device_class arg to ina226 sensor_schema call
* Add device_class arg to ina3221 sensor_schema call
* Add device_class arg to ibsth1 sensor_schema call
* Add device_class arg to max31855 sensor_schema call
* Add device_class arg to max31856 sensor_schema call
* Add device_class arg to max31865 sensor_schema call
* Add device_class arg to mhz19 sensor_schema call
* Add device_class arg to max6675 sensor_schema call
* Add device_class arg to mpu6050 sensor_schema call
* Add device_class arg to ms5611 sensor_schema call
* Add device_class arg to mcp9808 sensor_schema call
* Add device_class arg to ntc sensor_schema call
* Add device_class arg to pid sensor_schema call
* Add device_class arg to pmsx003 sensor_schema call
* Add device_class arg to pulse_counter sensor_schema call
* Add device_class arg to pulse_width sensor_schema call
* Add device_class arg to pzem004t sensor_schema call
* Add device_class arg to pzemac sensor_schema call
* Add device_class arg to pzemdc sensor_schema call
* Add device_class arg to qmc5883l sensor_schema call
* Add device_class arg to resistance sensor_schema call
* Add device_class arg to rotary_encoder sensor_schema call
* Add device_class arg to ruuvitag sensor_schema call
* Add device_class arg to scd30 sensor_schema call
* Add device_class arg to sds011 sensor_schema call
* Add device_class arg to senseair sensor_schema call
* Add device_class arg to sgp30 sensor_schema call
* Add device_class arg to sht3xd sensor_schema call
* Add device_class arg to shtcx sensor_schema call
* Add device_class arg to sps30 sensor_schema call
* Add device_class arg to sts3x sensor_schema call
* Add device_class arg to sun sensor_schema call
* Add device_class arg to tcs34725 sensor_schema call
* Add device_class arg to teleinfo sensor_schema call
* Add device_class arg to template sensor_schema call
* Add device_class arg to tmp102 sensor_schema call
* Add device_class arg to tmp117 sensor_schema call
* Add device_class arg to tsl2561 sensor_schema call
* Add device_class arg to tx20 sensor_schema call
* Add device_class arg to ultrasonic sensor_schema call
* Add device_class arg to uptime sensor_schema call
* Add device_class arg to vl53l0x sensor_schema call
* Add device_class arg to wifi_signal sensor_schema call
* Add device_class arg to xiaomi_cgd1 sensor_schema call
* Add device_class arg to xiaomi_cgg1 sensor_schema call
* Add device_class arg to xiaomi_gcls002 sensor_schema call
* Add device_class arg to xiaomi_hhccjcy01 sensor_schema call
* Add device_class arg to xiaomi_hhccpot002 sensor_schema call
* Add device_class arg to xiaomi_jqjcy01ym sensor_schema call
* Add device_class arg to xiaomi_lywsd02 sensor_schema call
* Add device_class arg to xiaomi_lywsd03mmc sensor_schema call
* Add device_class arg to xiaomi_lywsdcgq sensor_schema call
* Add device_class arg to xiaomi_mhoc401 sensor_schema call
* Add device_class arg to xiaomi_mjyd02yla sensor_schema call
* Add device_class arg to xiaomi_wx08zm sensor_schema call
* Add device_class arg to zyaura sensor_schema call
* Add device_class arg to ads1115 sensor_schema call
* Add device_class arg to adc sensor_schema call
* Add device_class arg to ade7953 sensor_schema call
* Add device_class arg to aht10 sensor_schema call
* Make args of sensor_schema required
* lint
Co-authored-by: Guillermo Ruffino <glm.net@gmail.com>
2021-02-27 19:28:06 -03:00
Otto Winter
d63cd8b4cd
Add additional custom lint checks ( #790 )
2019-10-23 14:43:27 +02:00
Michiel van Turnhout
9d26c16471
Binary sensor map implementation ( #551 )
...
* 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>
2019-05-28 20:41:10 +02:00