@ray-js/ipc-player-integration 0.0.45-beta.1 → 0.0.45-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1,5 @@
1
- export declare const useWaterTemperature: (devId: string) => string;
1
+ export declare const useWaterTemperature: (devId: string) => {
2
+ tempUnit: string;
3
+ waterTempC: string;
4
+ waterTempF: string;
5
+ };
@@ -1,23 +1,38 @@
1
1
  import { useEffect, useState } from 'react';
2
2
  import { useDpState } from '../useDpState';
3
- import { IPC_WATER_TEMPERATURE } from '../../utils/content/dpCode';
3
+ import { TEMP_UNIT_SELECT, IPC_WATER_TEMPERATURE, IPC_WATER_TEMPERATURE_F } from '../../utils/content/dpCode';
4
4
  import { showMathPowValue } from '../../utils/device';
5
5
  export const useWaterTemperature = devId => {
6
- const [waterTemp, setWaterTemp] = useState('');
6
+ const [tempUnit, setTempUnit] = useState('');
7
+ const [waterTempC, setWaterTempC] = useState('');
8
+ const [waterTempF, setWaterTempF] = useState('');
7
9
  const [dpState, schemaObj] = useDpState({
8
10
  devId,
9
- dpCodes: [IPC_WATER_TEMPERATURE]
11
+ dpCodes: [TEMP_UNIT_SELECT, IPC_WATER_TEMPERATURE, IPC_WATER_TEMPERATURE_F]
10
12
  });
11
13
  useEffect(() => {
12
- var _schema$property;
13
- if (dpState[IPC_WATER_TEMPERATURE] === undefined) {
14
- setWaterTemp('');
15
- return;
14
+ // 1=华氏度 0=摄氏度
15
+ if (dpState[TEMP_UNIT_SELECT] !== undefined) {
16
+ setTempUnit(dpState[TEMP_UNIT_SELECT] + '');
16
17
  }
17
- const schema = schemaObj === null || schemaObj === void 0 ? void 0 : schemaObj[IPC_WATER_TEMPERATURE];
18
- const scale = (schema === null || schema === void 0 || (_schema$property = schema.property) === null || _schema$property === void 0 ? void 0 : _schema$property.scale) || 0;
19
- const value = showMathPowValue(dpState[IPC_WATER_TEMPERATURE], scale);
20
- setWaterTemp(`${value}°C`);
21
- }, [dpState, schemaObj]);
22
- return waterTemp;
18
+ if (dpState[IPC_WATER_TEMPERATURE] !== undefined) {
19
+ var _schema$property;
20
+ const schema = schemaObj && schemaObj[IPC_WATER_TEMPERATURE];
21
+ const scale = (schema === null || schema === void 0 || (_schema$property = schema.property) === null || _schema$property === void 0 ? void 0 : _schema$property.scale) || 0;
22
+ const value = showMathPowValue(dpState[IPC_WATER_TEMPERATURE], scale);
23
+ setWaterTempC(value + '°C');
24
+ }
25
+ if (dpState[IPC_WATER_TEMPERATURE_F] !== undefined) {
26
+ var _schema$property2;
27
+ const schema = schemaObj && schemaObj[IPC_WATER_TEMPERATURE_F];
28
+ const scale = (schema === null || schema === void 0 || (_schema$property2 = schema.property) === null || _schema$property2 === void 0 ? void 0 : _schema$property2.scale) || 0;
29
+ const value = showMathPowValue(dpState[IPC_WATER_TEMPERATURE_F], scale);
30
+ setWaterTempF(value + '°F');
31
+ }
32
+ }, [dpState]);
33
+ return {
34
+ tempUnit,
35
+ waterTempC,
36
+ waterTempF
37
+ };
23
38
  };
@@ -1,8 +1,8 @@
1
1
  @font-face {
2
2
  font-family: "icon-panel"; /* Project id 4727767 */
3
- src: url('iconfont.woff2?t=1782702695877') format('woff2'),
4
- url('iconfont.woff?t=1782702695877') format('woff'),
5
- url('iconfont.ttf?t=1782702695877') format('truetype');
3
+ src: url('iconfont.woff2?t=1784625396313') format('woff2'),
4
+ url('iconfont.woff?t=1784625396313') format('woff'),
5
+ url('iconfont.ttf?t=1784625396313') format('truetype');
6
6
  }
7
7
 
8
8
  .icon-panel {
@@ -13,19 +13,59 @@
13
13
  -moz-osx-font-smoothing: grayscale;
14
14
  }
15
15
 
16
- .icon-panel-lvye1:before {
16
+ .icon-panel-v-alarm-light-siren:before {
17
+ content: "\e6d5";
18
+ }
19
+
20
+ .icon-panel-v-alarm-light:before {
21
+ content: "\e6d6";
22
+ }
23
+
24
+ .icon-panel-stream-standard:before {
25
+ content: "\e6d7";
26
+ }
27
+
28
+ .icon-panel-feature-track:before {
29
+ content: "\e6d0";
30
+ }
31
+
32
+ .icon-panel-v-alarm-siren:before {
33
+ content: "\e6d1";
34
+ }
35
+
36
+ .icon-panel-v-alarm-off:before {
37
+ content: "\e6d2";
38
+ }
39
+
40
+ .icon-panel-stream-flowing:before {
41
+ content: "\e6d3";
42
+ }
43
+
44
+ .icon-panel-anti-flicker:before {
45
+ content: "\e6d4";
46
+ }
47
+
48
+ .icon-panel-Access-Key-Password:before {
49
+ content: "\e643";
50
+ }
51
+
52
+ .icon-panel-Access-Play:before {
53
+ content: "\e6cf";
54
+ }
55
+
56
+ .icon-panel-plant_water_temp:before {
17
57
  content: "\e6ce";
18
58
  }
19
59
 
20
- .icon-panel-lvye:before {
60
+ .icon-panel-plant_footer:before {
21
61
  content: "\e6cd";
22
62
  }
23
63
 
24
- .icon-panel-zhiwujilu:before {
64
+ .icon-panel-plant_record:before {
25
65
  content: "\e6cc";
26
66
  }
27
67
 
28
- .icon-panel-shuiwei:before {
68
+ .icon-panel-plant_water_level:before {
29
69
  content: "\e6c8";
30
70
  }
31
71
 
@@ -33,11 +73,11 @@
33
73
  content: "\e6c9";
34
74
  }
35
75
 
36
- .icon-panel-dengguang:before {
76
+ .icon-panel-plant_light:before {
37
77
  content: "\e6ca";
38
78
  }
39
79
 
40
- .icon-panel-zongkaiguan:before {
80
+ .icon-panel-plant_main_switch:before {
41
81
  content: "\e6cb";
42
82
  }
43
83
 
@@ -205,10 +245,6 @@
205
245
  content: "\e6a1";
206
246
  }
207
247
 
208
- .icon-panel-Access-Key-Password:before {
209
- content: "\e643";
210
- }
211
-
212
248
  .icon-panel-Access-Mobile1:before {
213
249
  content: "\e638";
214
250
  }