configuration.yaml, zigbee2mqtt/state.json

This commit is contained in:
Home Assistant Version Control
2026-08-07 04:24:34 +00:00
parent 2f7084b202
commit cf2254e093
2 changed files with 61 additions and 11 deletions
+50
View File
@@ -237,6 +237,56 @@ sensor:
method: left
round: 2
# 3D Printer Statistics (OctoPrint via MQTT discovery)
history_stats:
- name: "Printer Print Time Today"
unique_id: printer_print_time_today
entity_id: binary_sensor.octoprint_printing
state: "on"
type: time
start: "{{ today_at() }}"
end: "{{ now() }}"
- name: "Printer Print Time This Week"
unique_id: printer_print_time_this_week
entity_id: binary_sensor.octoprint_printing
state: "on"
type: time
start: "{{ now().replace(hour=0, minute=0, second=0, microsecond=0) - timedelta(days=now().weekday()) }}"
end: "{{ now() }}"
- name: "Printer Print Time Last 7 Days"
unique_id: printer_print_time_last_7_days
entity_id: binary_sensor.octoprint_printing
state: "on"
type: time
start: "{{ now() - timedelta(days=7) }}"
end: "{{ now() }}"
- name: "Printer Prints Today"
unique_id: printer_prints_today
entity_id: binary_sensor.octoprint_printing
state: "on"
type: count
start: "{{ today_at() }}"
end: "{{ now() }}"
- name: "Printer Prints This Week"
unique_id: printer_prints_this_week
entity_id: binary_sensor.octoprint_printing
state: "on"
type: count
start: "{{ now().replace(hour=0, minute=0, second=0, microsecond=0) - timedelta(days=now().weekday()) }}"
end: "{{ now() }}"
- name: "Printer Prints Last 7 Days"
unique_id: printer_prints_last_7_days
entity_id: binary_sensor.octoprint_printing
state: "on"
type: count
start: "{{ now() - timedelta(days=7) }}"
end: "{{ now() }}"
emulated_hue:
host_ip: 192.168.1.140
advertise_ip: 192.168.1.140