as per light card, I don’t see my light device as switch only as push button.
i dont kow how to set it as a switch or light
as per fan goes, this is my code.
output:
- platform: template
id: ceiling_fan
type: float
write_action:
- lambda: get_cc1101(transciver).beginTransmission();
- if:
condition:
lambda: return ((state == 0));
then:
# action for off
# - lambda: get_cc1101(transciver).beginTransmission();
- remote_transmitter.transmit_raw:
code: [767, -210, 263, -725, 742, -226, 757, -222, 244, -736, 271, -732, 744, -234, 747, -212, 265, -723, 264, -723, 289, -717, 259, -738, 248, -737, 247, -755, 247, -727, 271, -723, 248, -746, 247, -744, 243, -744, 243, -743, 739, -234, 264,
-726, 735, -234, 747, -223, 255, -741, 752, -233, 252, -721, 271, -720, 742, -236, 753, -210, 266, -726, 743, -222, 246]
repeat:
times: 3
wait_time: 4.733ms
# - lambda: get_cc1101(transciver).endTransmission();
- if:
condition:
lambda: return ((state > 0) && (state < 0.4));
then:
# action for speed 1
- remote_transmitter.transmit_raw:
code: [767, -210, 263, -725, 742, -226, 757, -222, 244, -736, 271, -732, 744, -234, 747, -212, 265, -723, 264, -723, 289, -717, 259, -738, 248, -737, 247, -755, 247, -727, 271, -723, 248, -746, 247, -744, 243, -744, 243, -743, 739, -234, 264,
-726, 735, -234, 747, -223, 255, -741, 752, -233, 252, -721, 271, -720, 742, -236, 753, -210, 266, -726, 743, -222, 246]
repeat: 5
- if:
condition:
lambda: return ((state > 0.4) && (state < 0.7));
then:
# action for speed 2
- remote_transmitter.transmit_raw:
code: [767, -210, 263, -725, 742, -226, 757, -222, 244, -736, 271, -732, 744, -234, 747, -212, 265, -723, 264, -723, 289, -717, 259, -738, 248, -737, 247, -755, 247, -727, 271, -723, 248, -746, 247, -744, 243, -744, 243, -743, 739, -234, 264,
-726, 735, -234, 747, -223, 255, -741, 752, -233, 252, -721, 271, -720, 742, -236, 753, -210, 266, -726, 743, -222, 246]
repeat: 5
- if:
condition:
lambda: return ((state > 0.7));
then:
# action for speed 3
- remote_transmitter.transmit_raw:
code: [767, -210, 263, -725, 742, -226, 757, -222, 244, -736, 271, -732, 744, -234, 747, -212, 265, -723, 264, -723, 289, -717, 259, -738, 248, -737, 247, -755, 247, -727, 271, -723, 248, -746, 247, -744, 243, -744, 243, -743, 739, -234, 264,
-726, 735, -234, 747, -223, 255, -741, 752, -233, 252, -721, 271, -720, 742, -236, 753, -210, 266, -726, 743, -222, 246]
repeat: 5
- lambda: get_cc1101(transciver).endTransmission();
fan:
- platform: speed
id: ceilingfan
output: ceiling_fan
name: "Ceiling Fan"
speed_count: 3
but I only see is as a slider and not as a 3 speed fan.
thanks,
Miguel