This repository has been archived by the owner on May 20, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 42
/
roomba.yaml
70 lines (59 loc) · 1.67 KB
/
roomba.yaml
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
esphome:
name: roomba_001
platform: ESP8266
board: d1_mini
includes:
- ../ESPHomeRoombaComponent.h
libraries:
- Roomba=https://github.com/Apocrathia/Roomba
substitutions:
# IMPORTANT NOTE: If you change the substitution name value, the state_topic/command_topic need to change as well.
name: "roomba_001"
# state topic, command topic, BRC pin, polling interval in milliseconds
init: 'RoombaComponent::instance("roomba_001/state", "roomba_001/command", D5, 1000);'
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
mqtt:
broker: !secret mqtt_broker
discovery: true
logger:
baud_rate: 0
level: info
ota:
custom_component:
- lambda: |-
auto r = ${init}
return {r};
sensor:
- platform: custom
lambda: |-
auto r = ${init}
return {r->distanceSensor, r->voltageSensor, r->currentSensor, r->chargeSensor, r->capacitySensor};
sensors:
- name: "${name} distance"
unit_of_measurement: "mm"
accuracy_decimals: 0
- name: "${name} voltage"
unit_of_measurement: "mV"
accuracy_decimals: 0
- name: "${name} current"
unit_of_measurement: "mA"
accuracy_decimals: 0
- name: "${name} charge"
unit_of_measurement: "mAh"
accuracy_decimals: 0
- name: "${name} capacity"
unit_of_measurement: "mAh"
accuracy_decimals: 0
binary_sensor:
- platform: status
name: "${name} Status"
- platform: custom
lambda: |-
auto r = ${init}
return {r->chargingBinarySensor, r->dockedBinarySensor, r->cleaningBinarySensor};
binary_sensors:
- name: "${name} charging"
- name: "${name} docked"
- name: "${name} cleaning"