-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathConfiguration.yaml
57 lines (51 loc) · 1.95 KB
/
Configuration.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
#不要直接替换整个文件, 只是添加下面的部分到你们的Configuration.yaml文件里面的sensor下面, 如果你们已经有sensor的类别请把下面的sensor删掉
sensor:
#下面这个是时间, 添加了才能用sensor.time这个实体
- platform: time_date
display_options:
- 'time'
- 'date'
- 'date_time'
- 'date_time_utc'
- 'date_time_iso'
- 'time_date'
- 'time_utc'
- 'beat'
#下面这个是日期的英文转中文设置, 添加了才能用sensor.date_string这个实体
- platform: template
sensors:
day:
value_template: >
{% set days = ["星期一", "星期二", "星期三", "星期四", "星期五", "星期六", "星期日"] %}
{{ days[now().weekday()] }}
month:
value_template: >
{% set months = ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"] %}
{{ months[now().month-1] }}
{{ strptime(states('sensor.date'), '%Y-%m-%d').day }}
date_string:
friendly_name: "Full Date"
value_template: "{{ states('sensor.day') }} , {{ states('sensor.month') }}日"
#这个也是和上面同理, 复制到Configuration.yaml里面的 camera 下面, 如果你们已经有camera的类别请把下面的camera删掉
camera:
- platform: xiaomi_cloud_map_extractor
host: 192.168.50.230
token: !secret roborock_token
username: !secret xiaomi_id
password: !secret xiaomi_pw
country: "cn"
draw: ["all"]
colors:
color_map_inside: [43, 47, 48]
color_map_outside: [32, 36, 37]
color_map_wall: [100, 196, 254]
color_grey_wall: [216, 5, 69]
color_path: [30, 80, 113]
color_virtual_walls: [100, 196, 254]
color_charger: [244, 103, 15]
color_robo: [244, 244, 144]
color_unknown: [0, 0, 0]
map_transformation:
rotate: 270
attributes:
- calibration_points