Commit Graph

28 Commits

Author SHA1 Message Date
Jesse Hills 214c237c8d
Housecleaning: Use walrus operator in fan (#6555)
Co-authored-by: Keith Burzinski <kbx81x@gmail.com>
2024-04-17 02:03:57 -05:00
Samuel Sieb 6a46548a8b
add template fan (#6310) 2024-03-10 15:42:02 -07:00
Tucker Kern ad79e4fe24
Add support for fan preset modes (#5694)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-12-12 14:13:26 +09:00
Jordan W. Cobb 9f033bce3b
Fan no off cycle action (#5564)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-10-19 20:02:27 +13:00
spacemanspiff2007 4eb69d6af5
Fix restore (#4655)
* ALWAYS_OFF for fan

* ALWAYS_OFF for light

* ALWAYS_OFF for switch
2023-04-12 21:28:02 +00:00
Oxan van Leeuwen 2a84db7f85
Refactor fan platform to resemble climate/cover platforms (#2848)
Co-authored-by: Oxan van Leeuwen <oxan@oxanvanleeuwen.nl>
Co-authored-by: rob-deutsch <robzyb+altgithub@gmail.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2022-01-23 22:21:54 +13:00
Joshua Spence f9a7f00843
Add restore_mode to fan component (#3051) 2022-01-22 20:41:58 +01:00
Paul Monigatti 471b82f727
EntityBase Refactor (#2418)
* Renamed Nameable to EntityBase (cpp)

* Renamed NAMEABLE_SCHEMA to ENTITY_BASE_SCHEMA (Python)

* Renamed cg.Nameable to cg.EntityBase (Python)

* Remove redundant use of CONF_NAME from esp32_touch

* Remove redundant use of CONF_NAME from mcp3008

* Updated test

* Moved EntityBase from Component.h and Component.cpp

* Added icon property to EntityBase

* Added CONF_ICON to ENTITY_BASE_SCHEMA and added setup_entity function to cpp_helpers

* Added MQTT component getters for icon and disabled_by_default

* Lint

* Removed icon field from MQTT components

* Code generation now uses setup_entity to setENTITY_BASE_SCHEMA fields

* Removed unused import

* Added cstdint include

* Optimisation: don't set icon if it is empty

* Remove icon from NumberTraits and SelectTraits

* Removed unused import

* Integration and Total Daily Energy sensors now inherit icons from their parents during code generation

* Minor comment correction

* Removed redundant icon-handling code from sensor, switch, and text_sensor

* Update esphome/components/tsl2591/tsl2591.h

Co-authored-by: Oxan van Leeuwen <oxan@oxanvanleeuwen.nl>

* Added icon property to binary sensor, climate, cover, and fan component tests

* Added icons for Binary Sensor, Climate, Cover, Fan, and Light  to API

* Consolidated EntityBase fields in MQTT components

Co-authored-by: Oxan van Leeuwen <oxan@oxanvanleeuwen.nl>
2021-10-10 10:37:05 +02:00
WeekendWarrior1 4d28afc153
add fan.cycle_speed action (#2329) 2021-09-27 08:32:46 +13:00
wifwucite fd836e982e
Mqtt topics to support numeric fan speed (#1859)
* numeric speed added

* when dumping config for MQTT components log a note when skipped due to is_internal

* added new topics to paython code validation/generation

* reformatted with black

* formatting corrected

* use dump_config_ mechanism to skip internal components

* use dump_config_ mechanism to skip internal components

* style issues resolved

* do_dump_config removed

* formatting fixed

* formatting fixed

* Drop parent dump_config() calls

Co-authored-by: Oxan van Leeuwen <oxan@oxanvanleeuwen.nl>
2021-09-22 13:42:58 +02:00
dgtal1 b0533db2eb
Add new trigger to fan component `on_speed_set` (#2246) 2021-09-08 15:15:57 +12:00
Chris Nussbaum a4d024f43d
Add is_on and is_off conditions for the fan component (#2225)
Co-authored-by: Chris Nussbaum <chris.nussbaum@protolabs.com>
2021-09-02 12:16:11 +12:00
WeekendWarrior1 de871862a8
Optionally set direction on fan.turn_on action (#2171)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2021-08-26 10:25:24 +12:00
Jesse Hills 93796491af
Allow entities to be disabled by default in HA (#2113)
Co-authored-by: Otto Winter <otto@otto-winter.com>
2021-08-10 13:45:31 +12:00
Otto Winter aebad04c0b
Convert core components to async-def coroutine syntax (#1658)
Co-authored-by: Guillermo Ruffino <glm.net@gmail.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2021-05-23 22:10:30 +02:00
Anthony Uk 96e46db272
Added fan triggers on_turn_on and on_turn_off (#1726) 2021-05-19 16:12:43 +12:00
Jim Ekman 7708b81ef5
Support fan speed levels (#1541)
* Add fan speed percentage support to the API

* Add float fan speed percentage

* Add percentage support to automation and configuration

* Update Tuya fan

* Fix pylint warning

* Update API to use speed levels instead of percentage

* Use speed levels

* Fix type warnings

* MQTT component now converts between speed levels and enums

* Webserver now supports speed_level

* Update prometheus

* Remove low/medium/high settings from speed fan

* Remove unused enum

* Configurable speed levels for speed fan

* Remove unused import

* Rename speed_level->speed and speed_levels->speed_count

* Rename supported_speed_levels -> supported_speed_count in API and FanTraits

Field id stays the same in the protocol, so the change is not breaking for aioesphome.
2021-03-17 10:40:02 -03:00
Guillermo Ruffino 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
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
Otto Winter 291d4be772
Fix medium fan speed (#595) 2019-06-01 22:00:09 +02:00
Otto Winter 999c1a5357
Warn if not registered properly 2019-05-21 12:23:38 +02:00
Otto Winter 766f6c045d
Updates 2019-04-24 23:49:02 +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 be5330b6ae
Simplify coroutine syntax (#503)
* Simplify coroutine syntax

* More

* Lint

* Fix

* More

* Lint
2019-04-09 14:30:12 +02:00
Otto Winter d332e491ad
Changes for 1.12 (#482)
* Update setup scripts

* Add delete action, remove Hass config command

* Update esphome.js

* Lint
2019-03-16 22:24:26 +01:00
Otto Winter 3b00cfd6c4
Convert automation engine to use variadic templates (#452) 2019-02-26 19:28:11 +01:00
Otto Winter 3d9301a0f7
Rename esphomeyaml to esphome (#426)
* Rename

* Update

* Add migration

* Fix

* Fix dashboard

* Change test

* Fixes

* Code cleanup

* Fix import order

* Update

* Automate docker builds

* Shellcheck
2019-02-13 16:54:02 +01:00