| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- ---
- button:
- - platform: restart
- name: "${friendly_devicename} Restart"
- - platform: safe_mode
- name: "${friendly_devicename} Safe Mode Boot"
- entity_category: diagnostic
- sensor:
- - platform: uptime
- name: Uptime Sensor
- id: uptime_sensor
- update_interval: 60s
- on_raw_value:
- then:
- - text_sensor.template.publish:
- id: uptime_human
- state: !lambda |-
- int seconds = round(id(uptime_sensor).raw_state);
- int days = seconds / (24 * 3600);
- seconds = seconds % (24 * 3600);
- int hours = seconds / 3600;
- seconds = seconds % 3600;
- int minutes = seconds / 60;
- seconds = seconds % 60;
- return (
- (days ? to_string(days) + "d " : "") +
- (hours ? to_string(hours) + "h " : "") +
- (minutes ? to_string(minutes) + "m " : "") +
- (to_string(seconds) + "s")
- ).c_str();
- - platform: wifi_signal
- name: "${friendly_devicename} WiFi Signal"
- id: ${low_devicename}_wifi_signal
- update_interval: 60s
- entity_category: diagnostic
- # Reports the WiFi signal strength in %
- - platform: copy
- source_id: "${low_devicename}_wifi_signal"
- name: "${friendly_devicename} WiFi Strength"
- filters:
- - lambda: return min(max(2 * (x + 100.0), 0.0), 100.0);
- unit_of_measurement: "%"
- entity_category: diagnostic
- - platform: uptime
- name: Uptime
- binary_sensor:
- - platform: status
- name: "${friendly_devicename} status"
- text_sensor:
- - platform: version
- name: "${friendly_devicename} Version"
- - platform: template
- name: Uptime Human Readable
- id: uptime_human
- icon: mdi:clock-start
- - platform: wifi_info
- ip_address:
- name: IP Address
- entity_category: diagnostic
|