137 lines
3.1 KiB
YAML
137 lines
3.1 KiB
YAML
text_sensor:
|
|
- platform: debug
|
|
reset_reason:
|
|
name: "ESP Reset Reason"
|
|
icon: mdi:anchor
|
|
entity_category: diagnostic
|
|
|
|
- platform: wifi_info
|
|
ip_address:
|
|
name: "ESP IP Address"
|
|
id: wifi_ip
|
|
icon: mdi:ip-network
|
|
entity_category: diagnostic
|
|
ssid:
|
|
name: "ESP WiFi SSID"
|
|
id: wifi_ssid
|
|
icon: mdi:wifi
|
|
entity_category: diagnostic
|
|
|
|
bssid:
|
|
name: "ESP AP BSSID (MAC)"
|
|
id: wifi_ap_bssid
|
|
entity_category: diagnostic
|
|
icon: mdi:access-point-network
|
|
|
|
mac_address:
|
|
name: "ESP MAC"
|
|
id: wifi_mac
|
|
icon: mdi:network
|
|
entity_category: diagnostic
|
|
|
|
- platform: template
|
|
name: Uptime
|
|
entity_category: diagnostic
|
|
update_interval: 5s
|
|
lambda: |-
|
|
int s = (int) id(sys_uptime).state;
|
|
int days = s / 86400;
|
|
s %= 86400;
|
|
int hours = s / 3600;
|
|
s %= 3600;
|
|
int minutes = s / 60;
|
|
s %= 60;
|
|
|
|
char buffer[32];
|
|
sprintf(buffer, "%dd %dh %dm %ds", days, hours, minutes, s);
|
|
return std::string(buffer);
|
|
|
|
|
|
- platform: template
|
|
name: "Zone1 Info"
|
|
id: tips_zone1_conf
|
|
icon: mdi:information-outline
|
|
entity_category: config
|
|
lambda: |-
|
|
return {"Configure below" };
|
|
update_interval: 1000s
|
|
|
|
- platform: template
|
|
name: "Zone2 Info"
|
|
id: tips_zone2_conf
|
|
icon: mdi:information-outline
|
|
entity_category: config
|
|
lambda: |-
|
|
return {"Configure below" };
|
|
update_interval: 1000s
|
|
|
|
- platform: template
|
|
name: "Zone3 Info"
|
|
id: tips_zone3_conf
|
|
icon: mdi:information-outline
|
|
entity_category: config
|
|
lambda: |-
|
|
return {"Configure below" };
|
|
update_interval: 1000s
|
|
|
|
- platform: template
|
|
name: "Zout1 Info"
|
|
id: tips_zone_ex1_conf
|
|
icon: mdi:information-outline
|
|
entity_category: config
|
|
lambda: |-
|
|
return {"Zone Exclusion 1" };
|
|
update_interval: 1000s
|
|
|
|
- platform: template
|
|
name: "Any-Presence Info"
|
|
id: tips_any_presence_conf
|
|
icon: mdi:information-outline
|
|
entity_category: config
|
|
lambda: |-
|
|
return {"Any Presence Config" };
|
|
update_interval: 1000s
|
|
|
|
- platform: template
|
|
name: "Target1 Direction"
|
|
id: target1_direction
|
|
icon: mdi:directions
|
|
- platform: template
|
|
name: "Target2 Direction"
|
|
id: target2_direction
|
|
icon: mdi:directions
|
|
- platform: template
|
|
name: "Target3 Direction"
|
|
id: target3_direction
|
|
icon: mdi:directions
|
|
|
|
- platform: template
|
|
name: "Target1 Position"
|
|
id: target1_position
|
|
icon: mdi:directions
|
|
- platform: template
|
|
name: "Target2 Position"
|
|
id: target2_position
|
|
icon: mdi:directions
|
|
- platform: template
|
|
name: "Target3 Position"
|
|
id: target3_position
|
|
icon: mdi:directions
|
|
|
|
- platform: template
|
|
name: Uptime
|
|
entity_category: diagnostic
|
|
update_interval: 5s
|
|
lambda: |-
|
|
int s = (int) id(sys_uptime).state;
|
|
int days = s / 86400;
|
|
s %= 86400;
|
|
int hours = s / 3600;
|
|
s %= 3600;
|
|
int minutes = s / 60;
|
|
s %= 60;
|
|
|
|
char buffer[32];
|
|
sprintf(buffer, "%dd %dh %dm %ds", days, hours, minutes, s);
|
|
return std::string(buffer);
|
|
|