vendor-mixin

Shelly 1

_images/shelly1.jpg

More information

Configuration parameters

  • name: (required) The name of the switch.

Sample configurations

shelly_1_vendor

Source configuration:

1
2
3
4
5
device:
  shelly_1_vendor:
    board: esp8285
    mixins:
    - kind: shelly_1

The rendered configuration:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
binary_sensor:
- device_class: power
  name: shelly_1_vendor_power
  on_press:
  - switch.toggle: shelly_1_vendor_switch
  pin:
    inverted: 'yes'
    mode: INPUT_PULLUP
    number: GPIO5
  platform: gpio
esphome:
  board: esp8285
  name: shelly_1_vendor
  platform: ESP8266
logger:
  esp8266_store_log_strings_in_flash: false
  level: DEBUG
switch:
- id: shelly_1_vendor_switch
  name: shelly_1_vendor_switch
  pin: GPIO4
  platform: gpio

Shelly 2

_images/shelly2.png

More information

Configuration parameters

  • name: (required) The name of the switch.

Sample configurations

shelly_2_vendor

Source configuration:

1
2
3
4
5
device:
  shelly_2_vendor:
    board: esp8285
    mixins:
    - kind: shelly_2

The rendered configuration:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
binary_sensor:
- device_class: power
  name: shelly_2_vendor_1_power
  on_press:
  - switch.toggle: shelly_2_vendor_1_switch
  pin:
    inverted: 'yes'
    mode: INPUT_PULLUP
    number: GPIO12
  platform: gpio
- device_class: power
  name: shelly_2_vendor_2_power
  on_press:
  - switch.toggle: shelly_2_vendor_2_switch
  pin:
    inverted: 'yes'
    mode: INPUT_PULLUP
    number: GPIO14
  platform: gpio
esphome:
  board: esp8285
  name: shelly_2_vendor
  platform: ESP8266
logger:
  esp8266_store_log_strings_in_flash: false
  level: DEBUG
switch:
- id: shelly_2_vendor_1_switch
  name: shelly_2_vendor_1_switch
  pin: GPIO4
  platform: gpio
- id: shelly_2_vendor_2_switch
  name: shelly_2_vendor_2_switch
  pin: GPIO5
  platform: gpio

Sonoff 4CH / Sonoff 4CH Pro

_images/sonoff-4ch.png

More information

Configuration parameters

  • name: (required) The name of the switch.

Sample configurations

sonoff_4ch_pro_vendor

Source configuration:

1
2
3
4
5
device:
  sonoff_4ch_pro_vendor:
    board: esp8285
    mixins:
    - kind: sonoff_4ch_pro

The rendered configuration:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
binary_sensor:
- device_class: power
  name: sonoff_4ch_pro_vendor_1_power
  on_press:
  - switch.toggle: sonoff_4ch_pro_vendor_1_switch
  pin:
    inverted: 'yes'
    mode: INPUT_PULLUP
    number: GPIO12
  platform: gpio
- device_class: power
  name: sonoff_4ch_pro_vendor_2_power
  on_press:
  - switch.toggle: sonoff_4ch_pro_vendor_2_switch
  pin:
    inverted: 'yes'
    mode: INPUT_PULLUP
    number: GPIO5
  platform: gpio
- device_class: power
  name: sonoff_4ch_pro_vendor_3_power
  on_press:
  - switch.toggle: sonoff_4ch_pro_vendor_3_switch
  pin:
    inverted: 'yes'
    mode: INPUT_PULLUP
    number: GPIO4
  platform: gpio
- device_class: power
  name: sonoff_4ch_pro_vendor_4_power
  on_press:
  - switch.toggle: sonoff_4ch_pro_vendor_4_switch
  pin:
    inverted: 'yes'
    mode: INPUT_PULLUP
    number: GPIO15
  platform: gpio
esphome:
  board: esp8285
  name: sonoff_4ch_pro_vendor
  platform: ESP8266
light:
- name: sonoff_4ch_pro_vendor_light
  output: sonoff_4ch_pro_vendor_light
  platform: monochromatic
logger:
  esp8266_store_log_strings_in_flash: false
  level: DEBUG
output:
- id: sonoff_4ch_pro_vendor_light
  inverted: true
  pin: GPIO13
  platform: esp8266_pwm
switch:
- id: sonoff_4ch_pro_vendor_1_switch
  name: sonoff_4ch_pro_vendor_1_switch
  pin: GPIO0
  platform: gpio
- id: sonoff_4ch_pro_vendor_2_switch
  name: sonoff_4ch_pro_vendor_2_switch
  pin: GPIO9
  platform: gpio
- id: sonoff_4ch_pro_vendor_3_switch
  name: sonoff_4ch_pro_vendor_3_switch
  pin: GPIO10
  platform: gpio
- id: sonoff_4ch_pro_vendor_4_switch
  name: sonoff_4ch_pro_vendor_4_switch
  pin: GPIO14
  platform: gpio

Sonoff 4CH Pro R2

_images/sonoff-4ch-pro.png

Configuration parameters

  • name: (required) The name of the switch.

Sample configurations

sonoff_4ch_pro_r2_vendor

Source configuration:

1
2
3
4
5
device:
  sonoff_4ch_pro_r2_vendor:
    board: esp8285
    mixins:
    - kind: sonoff_4ch_pro_r2

The rendered configuration:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
binary_sensor:
- device_class: power
  name: sonoff_4ch_pro_r2_vendor_1_power
  on_press:
  - switch.toggle: sonoff_4ch_pro_r2_vendor_1_switch
  pin:
    inverted: 'yes'
    mode: INPUT_PULLUP
    number: GPIO12
  platform: gpio
- device_class: power
  name: sonoff_4ch_pro_r2_vendor_2_power
  on_press:
  - switch.toggle: sonoff_4ch_pro_r2_vendor_2_switch
  pin:
    inverted: 'yes'
    mode: INPUT_PULLUP
    number: GPIO5
  platform: gpio
- device_class: power
  name: sonoff_4ch_pro_r2_vendor_3_power
  on_press:
  - switch.toggle: sonoff_4ch_pro_r2_vendor_3_switch
  pin:
    inverted: 'yes'
    mode: INPUT_PULLUP
    number: GPIO4
  platform: gpio
- device_class: power
  name: sonoff_4ch_pro_r2_vendor_4_power
  on_press:
  - switch.toggle: sonoff_4ch_pro_r2_vendor_4_switch
  pin:
    inverted: 'yes'
    mode: INPUT_PULLUP
    number: GPIO15
  platform: gpio
esphome:
  board: esp8285
  name: sonoff_4ch_pro_r2_vendor
  platform: ESP8266
logger:
  esp8266_store_log_strings_in_flash: false
  level: DEBUG
switch:
- id: sonoff_4ch_pro_r2_vendor_1_switch
  name: sonoff_4ch_pro_r2_vendor_1_switch
  pin: GPIO0
  platform: gpio
- id: sonoff_4ch_pro_r2_vendor_2_switch
  name: sonoff_4ch_pro_r2_vendor_2_switch
  pin: GPIO9
  platform: gpio
- id: sonoff_4ch_pro_r2_vendor_3_switch
  name: sonoff_4ch_pro_r2_vendor_3_switch
  pin: GPIO10
  platform: gpio
- id: sonoff_4ch_pro_r2_vendor_4_switch
  name: sonoff_4ch_pro_r2_vendor_4_switch
  pin: GPIO14
  platform: gpio

Sonoff Basic

_images/sonoff-basic.png

More information

Configuration parameters

  • name: (required) The name of the switch.

Sample configurations

sonoff_basic_vendor

Source configuration:

1
2
3
4
5
device:
  sonoff_basic_vendor:
    board: esp8285
    mixins:
    - kind: sonoff_basic

The rendered configuration:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
binary_sensor:
- device_class: power
  name: sonoff_basic_vendor_power
  on_press:
  - switch.toggle: sonoff_basic_vendor_switch
  pin:
    inverted: 'yes'
    mode: INPUT_PULLUP
    number: GPIO0
  platform: gpio
esphome:
  board: esp8285
  name: sonoff_basic_vendor
  platform: ESP8266
logger:
  esp8266_store_log_strings_in_flash: false
  level: DEBUG
switch:
- id: sonoff_basic_vendor_switch
  name: sonoff_basic_vendor_switch
  pin: GPIO12
  platform: gpio

Sonoff Mini

_images/sonoff-mini.jpg

Configuration parameters

  • name: (required) The name of the switch.

Sample configurations

sonoff_mini_vendor

Source configuration:

1
2
3
4
5
device:
  sonoff_mini_vendor:
    board: esp8285
    mixins:
    - kind: sonoff_mini

The rendered configuration:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
binary_sensor:
- device_class: power
  name: sonoff_mini_vendor_power
  on_press:
  - switch.toggle: sonoff_mini_vendor_switch
  pin:
    inverted: 'yes'
    mode: INPUT_PULLUP
    number: GPIO0
  platform: gpio
esphome:
  board: esp8285
  name: sonoff_mini_vendor
  platform: ESP8266
light:
- name: sonoff_mini_vendor_light
  output: sonoff_mini_vendor_light
  platform: monochromatic
logger:
  esp8266_store_log_strings_in_flash: false
  level: DEBUG
output:
- id: sonoff_mini_vendor_light
  inverted: true
  pin: GPIO13
  platform: esp8266_pwm
switch:
- id: sonoff_mini_vendor_switch
  name: sonoff_mini_vendor_switch
  pin: GPIO12
  platform: gpio

Sonoff Pow R1

_images/sonoff-pow.png

More information

Configuration parameters

  • name: (required) The name of the switch.

Sonoff Pow R2

_images/sonoff-pow.png

Configuration parameters

  • name: (required) The name of the switch.

Sonoff S20

_images/sonoff-s20.png

More information

Configuration parameters

  • name: (required) The name of the switch.

Sample configurations

sonoff_s20_vendor_name

Source configuration:

1
2
3
4
5
6
device:
  sonoff_s20_vendor_name:
    board: esp8285
    mixins:
    - kind: sonoff_s20
      name: test_plug

The rendered configuration:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
binary_sensor:
- device_class: power
  name: test_plug_power
  on_press:
  - switch.toggle: test_plug_switch
  pin:
    inverted: 'yes'
    mode: INPUT_PULLUP
    number: GPIO0
  platform: gpio
esphome:
  board: esp8285
  name: sonoff_s20_vendor_name
  platform: ESP8266
light:
- name: test_plug_light
  output: test_plug_light
  platform: monochromatic
logger:
  esp8266_store_log_strings_in_flash: false
  level: DEBUG
output:
- id: test_plug_light
  inverted: true
  pin: GPIO13
  platform: esp8266_pwm
switch:
- id: test_plug_switch
  name: test_plug_switch
  pin: GPIO12
  platform: gpio

sonoff_s20_vendor

Source configuration:

1
2
3
4
5
device:
  sonoff_s20_vendor:
    board: esp8285
    mixins:
    - kind: sonoff_s20

The rendered configuration:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
binary_sensor:
- device_class: power
  name: sonoff_s20_vendor_power
  on_press:
  - switch.toggle: sonoff_s20_vendor_switch
  pin:
    inverted: 'yes'
    mode: INPUT_PULLUP
    number: GPIO0
  platform: gpio
esphome:
  board: esp8285
  name: sonoff_s20_vendor
  platform: ESP8266
light:
- name: sonoff_s20_vendor_light
  output: sonoff_s20_vendor_light
  platform: monochromatic
logger:
  esp8266_store_log_strings_in_flash: false
  level: DEBUG
output:
- id: sonoff_s20_vendor_light
  inverted: true
  pin: GPIO13
  platform: esp8266_pwm
switch:
- id: sonoff_s20_vendor_switch
  name: sonoff_s20_vendor_switch
  pin: GPIO12
  platform: gpio

Sonoff S22

More information

Configuration parameters

  • name: (required) The name of the switch.

Sonoff S26

_images/sonoff-s26.png

More information

Configuration parameters

  • name: (required) The name of the switch.

Sonoff S31

_images/sonoff-s31.png

More information

Configuration parameters

  • name: (required) The name of the switch.

Sample configurations

sonoff_s31_vendor

Source configuration:

1
2
3
4
5
device:
  sonoff_s31_vendor:
    board: esp8285
    mixins:
    - kind: sonoff_s31

The rendered configuration:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
binary_sensor:
- device_class: power
  name: sonoff_s31_vendor_power
  on_press:
  - switch.toggle: sonoff_s31_vendor_switch
  pin:
    inverted: 'yes'
    mode: INPUT_PULLUP
    number: GPIO0
  platform: gpio
esphome:
  board: esp8285
  name: sonoff_s31_vendor
  platform: ESP8266
light:
- name: sonoff_s31_vendor_light
  output: sonoff_s31_vendor_light
  platform: monochromatic
logger:
  esp8266_store_log_strings_in_flash: false
  level: DEBUG
output:
- id: sonoff_s31_vendor_light
  inverted: true
  pin: GPIO13
  platform: esp8266_pwm
sensor:
- current:
    id: sonoff_s31_vendor_current
    name: sonoff_s31_vendor_current
  platform: cse7766
  power:
    id: sonoff_s31_vendor_power
    name: sonoff_s31_vendor_power
  update_interval: 5s
  voltage:
    id: sonoff_s31_vendor_voltage
    name: sonoff_s31_vendor_voltage
switch:
- id: sonoff_s31_vendor_switch
  name: sonoff_s31_vendor_switch
  pin: GPIO12
  platform: gpio
uart:
  baud_rate: 4800
  rx_pin: RX