fix climate_ir on receive optional (#897)

* fix climate on receive optional

* add climate tests
This commit is contained in:
Guillermo Ruffino 2019-12-03 11:50:06 -03:00 committed by GitHub
parent 6433da13a3
commit 0f406c38eb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 3 deletions

View file

@ -51,6 +51,9 @@ class ClimateIR : public climate::Climate, public Component, public remote_base:
/// Transmit via IR the state of this climate controller. /// Transmit via IR the state of this climate controller.
virtual void transmit_state() = 0; virtual void transmit_state() = 0;
// Dummy implement on_receive so implementation is optional for inheritors
bool on_receive(remote_base::RemoteReceiveData data) override { return false; };
bool supports_cool_{true}; bool supports_cool_{true};
bool supports_heat_{true}; bool supports_heat_{true};
bool supports_dry_{false}; bool supports_dry_{false};

View file

@ -1154,6 +1154,11 @@ climate:
sensor: my_sensor sensor: my_sensor
- platform: coolix - platform: coolix
name: Coolix Climate name: Coolix Climate
- platform: fujitsu_general
name: Fujitsu General Climate
- platform: yashima
name: Yashima Climate
switch: switch:
- platform: gpio - platform: gpio