Hello, I’m currently getting started with my first ESPHome projects. I’d like to control the MaxxAir Fan (a roof fan) using ESPHome with the help of an IR transmitter. I’ve already gathered the commands for it and it seems to work with my config.
The fan has a separate command for each 10% increment, and it can also rotate in two different directions. This means there are at least 20 commands. Now, I want to control the fan in Lovelace using a slider instead of individual buttons. Currently, I’ve defined all the commands as buttons. How can I implement the ability to control the fan with one (or two for In and Out) sliders?
Below is my ESPHome configuration for the fan and an image of how it should look.
esphome:
name: remotetransmittertest
friendly_name: RemoteTransmitterTest
esp8266:
board: d1_mini
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "****************************************"
ota:
password: "***************"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Remotetransmittertest"
password: "************"
captive_portal:
# Example configuration entry
remote_transmitter:
pin: D8
carrier_duty_percent: 50%
# Individual switches
button:
- platform: template
name: "MaxxAir Open"
icon: mdi:fan
on_press:
- remote_transmitter.transmit_pronto:
data: "1744 750 894 1596 866 796 868 1618 874 790 864 796 1696 796 870 2450 6644 2494 868 5778 872 1618 5850 796 868 1620 862 4956 868 2450 5020 798 1694 1626 866 4120 866 3284 4196 794 2548 1604 2492 1664 1688 3290 7522 1616 1662 836 870 786 3360 1622 1668 828 3372 780 864 1624 868 8270 864 1628 2490 832 1690 1628 2540 788 866 792 1690 2460 872 792 5848"
- platform: template
name: "MaxxAir Close"
icon: mdi:fan
on_press:
- remote_transmitter.transmit_pronto:
data: "1744 750 894 1596 866 796 868 1618 874 790 864 796 1696 796 870 2450 6644 2494 868 5778 872 1618 5850 796 868 1620 862 4956 868 2450 5020 798 1694 1626 866 4120 866 3284 4196 794 2548 1604 2492 1664 1688 3290 7522 1616 1662 836 870 786 3360 1622 1668 828 3372 780 864 1624 868 8270 864 1628 2490 832 1690 1628 2540 788 866 792 1690 2460 872 792 5848"
- platform: template
name: "MaxxAir Out 0%"
icon: mdi:fan
on_press:
- remote_transmitter.transmit_pronto:
data: "1698 794 872 1618 844 816 838 1650 844 818 836 824 1670 820 834 2484 6644 2492 838 5804 838 1652 5850 794 840 1646 836 4980 834 2482 5000 816 1698 1620 874 4110 866 3282 4200 788 2524 1628 2490 1662 1690 3286 2540 1614 3364 1614 1664 832 1692 1626 1694 1624 1708 786 3374 778 866 1620 874 8262 864 1628 2490 830 1692 1624 5020 796 870 2448 872 792 5852"
- platform: template
name: "MaxxAir Out 10%"
icon: mdi:fan
on_press:
- remote_transmitter.transmit_pronto:
data: "1668 828 900 1590 870 788 866 1622 870 792 872 788 1726 766 866 2452 6640 2498 866 5780 872 1618 5850 796 870 1618 864 4952 862 2456 5024 794 1698 1620 862 4124 872 3276 4194 794 2514 1634 2492 1664 1688 3288 870 792 872 1620 862 798 1694 1624 1696 800 864 794 3334 1648 1662 830 3370 784 870 1620 862 8274 872 1618 2508 814 1690 1630 862 800 1662 2492 870 2448 862 802 5850"
- platform: template
name: "MaxxAir Out 20%"
icon: mdi:fan
on_press:
- remote_transmitter.transmit_pronto:
data: "1664 828 868 1624 868 792 862 1624 890 774 870 792 1690 800 864 2452 6642 2496 866 5780 862 1628 5852 794 870 1618 834 4982 864 2454 5024 792 1690 1630 864 4120 866 3284 4196 792 2518 1632 2484 1672 1692 3284 862 802 862 1628 3370 1608 2540 786 866 794 2516 1634 1666 828 3372 780 864 1624 870 8266 868 1624 2492 830 1694 1624 838 2488 3368 2440 870 794 5848"
- platform: template
name: "MaxxAir Out 30%"
icon: mdi:fan
on_press:
- remote_transmitter.transmit_pronto:
data: "1660 832 874 1616 866 794 870 1616 866 798 866 794 1700 792 872 2446 6648 2488 896 5750 892 1600 5848 796 870 1618 896 4920 872 2446 5024 792 1690 1630 874 4110 866 3284 4196 792 2520 1632 2484 1670 1692 3284 862 800 866 1626 3370 1608 1660 3326 2520 1630 1660 836 3366 786 868 1620 862 8274 872 1620 2486 836 1688 1628 864 800 864 1626 2492 2488 894 768 5852"
- platform: template
name: "MaxxAir Out 40%"
icon: mdi:fan
on_press:
- remote_transmitter.transmit_pronto:
data: "1662 830 866 1626 868 792 872 1614 868 796 870 790 1690 800 866 2452 6642 2494 868 5778 864 1626 5844 800 864 1624 870 4946 868 2450 5020 798 1696 1624 870 4114 872 3278 4202 784 2514 1636 2492 1664 1688 3288 872 792 862 1628 3370 1610 3366 790 864 796 1696 1622 1668 826 3364 788 866 1622 870 8264 872 1620 2486 836 1688 1630 862 1630 862 2458 862 2454 866 798 5844"
- platform: template
name: "MaxxAir Out 50%"
icon: mdi:fan
on_press:
- remote_transmitter.transmit_pronto:
data: "1696 796 868 1622 870 792 862 1624 870 794 870 788 1714 776 868 2450 6644 2494 868 5776 866 1624 5844 800 834 1654 840 4976 868 2448 5022 794 1666 1654 860 4122 864 3284 4196 794 2516 1632 2486 1670 1692 3312 806 830 834 1684 3314 1666 1634 864 1640 1682 1628 1688 1664 830 3318 834 832 1684 778 8330 806 1686 2462 860 1634 1684 808 856 3314 866 778 2540 780 856 5786"
- platform: template
name: "MaxxAir Out 60%"
icon: mdi:fan
on_press:
- remote_transmitter.transmit_pronto:
data: "1672 824 842 1648 846 814 840 1648 844 818 838 824 1670 822 844 2474 6652 2484 838 5806 846 1644 5828 818 836 1652 840 4974 842 2476 4994 824 1668 1650 844 4142 844 3304 4166 822 2488 1660 2540 1614 1664 3312 836 826 838 1652 3346 1636 2512 3302 1662 1656 1718 776 3340 812 842 1646 838 8298 836 1654 2538 784 1666 1652 840 3316 844 816 840 2480 842 822 5820"
- platform: template
name: "MaxxAir Out 70%"
icon: mdi:fan
on_press:
- remote_transmitter.transmit_pronto:
data: "1662 830 846 1644 838 824 842 1646 836 826 838 822 1662 828 838 2482 6648 2488 864 5780 872 1618 5854 790 866 1622 870 4946 868 2450 5022 794 1688 1630 862 4120 866 3282 4198 788 2524 1626 2490 1666 1698 3278 870 794 872 1618 3370 1610 1668 1658 2492 832 874 1610 1658 836 3364 786 868 1620 872 8262 864 1628 2490 832 1694 1624 868 794 870 792 864 794 870 3276 872 792 5854"
- platform: template
name: "MaxxAir Out 80%"
icon: mdi:fan
on_press:
- remote_transmitter.transmit_pronto:
data: "1660 832 844 1646 836 824 840 1646 836 828 838 820 1662 828 836 2482 6700 2434 844 5800 844 1646 5826 818 836 1652 842 4972 842 2476 4996 820 1664 1654 838 4144 842 3308 4174 814 2488 1662 2540 1614 1664 3310 836 826 838 1652 3336 1642 4172 814 840 822 844 1642 1712 782 3344 806 838 1650 842 8292 844 1648 2544 778 1662 1654 838 1656 3342 3298 840 822 5820"
- platform: template
name: "MaxxAir Out 90%"
icon: mdi:fan
on_press:
- remote_transmitter.transmit_pronto:
data: "1662 830 834 1654 838 824 842 1644 838 826 838 820 1662 830 836 2482 6646 2490 842 5802 840 1652 5818 824 842 1646 834 4980 844 2474 4996 820 1664 1656 836 4146 840 3310 4172 814 2498 1652 2496 1660 1660 3316 844 820 846 1644 3342 1636 1662 836 840 1648 834 826 838 1646 1664 832 3368 782 840 1648 846 8290 846 1646 2492 830 1662 1656 838 826 1666 824 1670 3308 840 824 5818"
- platform: template
name: "MaxxAir Out 100%"
icon: mdi:fan
on_press:
- remote_transmitter.transmit_pronto:
data: "1666 830 836 1654 838 820 834 1654 840 822 842 818 1666 826 840 2480 6692 2442 836 5808 846 1646 5816 828 836 1650 842 4972 844 2474 4996 820 1662 1656 838 4146 840 3308 4174 814 2486 1662 2538 1616 1664 3312 836 826 838 1652 842 820 1662 1656 2546 778 1662 1662 842 1644 1668 824 3376 776 838 1650 842 8294 844 1646 2544 778 1664 1656 838 2488 842 814 840 3308 840 824 5820"
- platform: template
name: "MaxxAir In 0%"
icon: mdi:fan
on_press:
- remote_transmitter.transmit_pronto:
data: "1666 828 838 1652 840 818 836 1652 842 820 834 826 1666 824 842 2476 6694 2440 838 5806 838 1652 5820 824 840 1648 834 4978 836 2482 4990 826 1668 1650 844 4142 834 3312 4170 818 2492 1654 2536 1618 1660 3314 3340 816 3366 1614 1664 830 1662 1656 1664 1654 1668 824 3346 808 836 1650 842 8292 844 1646 2544 778 1664 1654 2546 780 1660 828 838 2480 840 822 5822"
- platform: template
name: "MaxxAir In 10%"
icon: mdi:fan
on_press:
- remote_transmitter.transmit_pronto:
data: "1666 828 836 1654 892 768 866 1622 870 790 896 766 1696 794 870 2448 6646 2488 864 5780 872 1618 5852 792 862 1626 868 4946 868 2450 5020 796 1696 1622 870 4114 872 3276 4194 794 2516 1632 2486 1670 1694 3282 866 796 1696 794 870 790 1692 1628 1694 802 864 794 3364 1616 1664 828 3372 782 862 1624 868 8268 868 1622 2484 838 1688 1632 872 790 864 3288 872 2446 864 800 5854"
- platform: template
name: "MaxxAir In 20%"
icon: mdi:fan
on_press:
- remote_transmitter.transmit_pronto:
data: "1692 800 864 1626 868 794 872 1616 866 796 868 790 1692 800 866 2452 6646 2490 874 5772 870 1620 5850 794 870 1616 866 4950 864 2454 5028 788 1694 1626 866 4116 872 3278 4192 794 2516 1634 2494 1662 1690 3286 862 802 1692 798 3372 1608 2540 786 870 788 2522 1628 1662 834 3368 784 872 1616 876 8260 866 1626 2492 830 1694 1624 870 1622 4194 2448 872 790 5856"
- platform: template
name: "MaxxAir In 30%"
icon: mdi:fan
on_press:
- remote_transmitter.transmit_pronto:
data: "1664 830 866 1624 870 790 864 1624 870 792 872 788 1696 796 870 2448 6646 2488 864 5780 872 1618 5852 792 864 1624 870 4944 870 2448 5022 794 1698 1620 862 4122 864 3282 4200 788 2524 1626 2534 1620 1692 3284 864 800 1694 798 3374 1606 1694 3290 2484 1666 1666 826 3374 778 866 1622 872 8262 864 1626 2532 788 1694 1624 868 794 1668 824 2488 2492 870 792 5852"
- platform: template
name: "MaxxAir In 40%"
icon: mdi:fan
on_press:
- remote_transmitter.transmit_pronto:
data: "1666 828 836 1652 840 818 836 1652 842 820 844 816 1668 824 842 2476 6692 2444 836 5808 844 1646 5816 828 838 1650 844 4970 844 2474 4998 818 1664 1652 840 4144 844 3302 4168 820 2490 1658 2542 1612 1668 3308 842 822 1670 820 3340 1640 3338 818 838 822 1660 1658 1664 830 3340 812 844 1644 838 8298 838 1650 2540 780 1660 1658 834 4980 834 2482 838 826 5818"
- platform: template
name: "MaxxAir In 50%"
icon: mdi:fan
on_press:
- remote_transmitter.transmit_pronto:
data: "1698 794 870 1618 864 796 868 1618 864 798 866 794 1690 800 864 2454 6644 2490 872 5772 870 1620 5852 792 872 1614 868 4948 866 2452 5020 796 1698 1620 874 4110 866 3282 4200 788 2522 1626 2492 1664 1690 3286 874 790 1692 798 3372 1606 1662 836 1690 1628 1692 1626 1716 778 3372 780 864 1624 870 8266 870 1622 2484 836 1698 1620 862 800 864 798 1696 792 864 2454 866 798 5848"
- platform: template
name: "MaxxAir In 60%"
icon: mdi:fan
on_press:
- remote_transmitter.transmit_pronto:
data: "1660 832 864 1626 866 792 874 1614 868 794 870 790 1692 798 866 2452 6644 2490 872 5772 838 1652 5852 792 872 1614 868 4948 868 2450 5022 796 1698 1620 864 4122 866 3282 4200 790 2522 1626 2492 1664 1698 3278 870 794 1690 800 3370 1612 2536 3278 1700 1620 1658 834 3368 784 870 1618 876 8260 866 1624 2492 828 1696 1622 870 1622 870 790 864 796 868 2450 872 792 5854"
- platform: template
name: "MaxxAir In 70%"
icon: mdi:fan
on_press:
- remote_transmitter.transmit_pronto:
data: "1662 832 866 1624 868 790 864 1624 868 794 872 788 1694 796 868 2450 6648 2488 864 5780 864 1626 5846 798 866 1620 872 4940 864 2454 5028 788 1694 1622 870 4116 872 3276 4196 792 2520 1628 2540 1616 1694 3280 870 794 1698 790 3368 1612 1698 1624 2494 830 866 1620 1660 834 3368 784 838 1650 844 8290 836 1654 2536 786 1666 1652 840 822 2542 780 842 3306 844 820 5824"
- platform: template
name: "MaxxAir In 80%"
icon: mdi:fan
on_press:
- remote_transmitter.transmit_pronto:
data: "1668 826 840 1650 842 818 838 1650 844 820 834 826 1668 822 844 2474 6644 2492 840 5804 838 1650 5852 792 874 1614 868 4946 838 2480 4992 824 1668 1650 844 4140 836 3312 4170 818 2492 1656 2536 1618 1660 3314 846 818 1662 828 3374 1604 4170 816 838 824 842 1644 1666 826 3376 776 836 1650 842 8292 844 1646 2534 786 1664 1654 838 2488 2488 3318 842 820 5824"
- platform: template
name: "MaxxAir In 90%"
icon: mdi:fan
on_press:
- remote_transmitter.transmit_pronto:
data: "1668 826 840 1650 842 818 838 1650 844 820 834 826 1668 822 844 2474 6644 2492 840 5804 838 1650 5852 792 874 1614 868 4946 838 2480 4992 824 1668 1650 844 4140 836 3312 4170 818 2492 1656 2536 1618 1660 3314 846 818 1662 828 3374 1604 4170 816 838 824 842 1644 1666 826 3376 776 836 1650 842 8292 844 1646 2534 786 1664 1654 838 2488 2488 3318 842 820 5824"
- platform: template
name: "MaxxAir In 100%"
icon: mdi:fan
on_press:
- remote_transmitter.transmit_pronto:
data: "1662 830 834 1658 836 824 842 1644 838 826 870 790 1662 828 836 2480 6648 2488 874 5770 840 1650 5854 790 866 1622 870 4944 840 2478 5024 790 1692 1626 866 4116 870 3278 4194 792 2518 1632 2486 1668 1696 3280 868 796 1666 824 872 786 1696 1622 2548 776 1696 1628 866 1620 1712 782 3368 784 870 1616 866 8270 866 1626 2492 828 1696 1622 872 1620 1690 802 874 3274 864 798 5846"
Source:
currently it looks like this: