Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save bessarabov/c30d9551a82682b22be824ffc6dbc6d5 to your computer and use it in GitHub Desktop.
Save bessarabov/c30d9551a82682b22be824ffc6dbc6d5 to your computer and use it in GitHub Desktop.
sqlite> select entity_id, state from states where entity_id = 'sensor.cpu_get_throttled' limit 10;
entity_id|state
sensor.cpu_get_throttled|0
sensor.cpu_get_throttled|80008
sensor.cpu_get_throttled|0
sensor.cpu_get_throttled|80008
sensor.cpu_get_throttled|80000
sensor.cpu_get_throttled|0
sensor.cpu_get_throttled|80000
sensor.cpu_get_throttled|80008
sensor.cpu_get_throttled|0
sensor.cpu_get_throttled|80000
sqlite
sqlite> select time_fired, event_data from events where event_data like '{"entity_id": "sensor.cpu_get_throttled%' limit 10;
time_fired|event_data
2020-07-07 01:13:50.271022|{"entity_id": "sensor.cpu_get_throttled", "old_state": {"entity_id": "sensor.cpu_get_throttled", "state": "80008", "attributes": {"friendly_name": "CPU get_throttled"}, "last_changed": "2020-07-07T01:11:48.240535+00:00", "last_updated": "2020-07-07T01:11:48.240535+00:00", "context": {"id": "f99a51e82b124ba3b2d5e6ceaa568bf9", "parent_id": null, "user_id": null}}, "new_state": {"entity_id": "sensor.cpu_get_throttled", "state": "0", "attributes": {"friendly_name": "CPU get_throttled"}, "last_changed": "2020-07-07T01:13:50.270795+00:00", "last_updated": "2020-07-07T01:13:50.270795+00:00", "context": {"id": "40fd1f6bf4b64953b76c8197fab31be2", "parent_id": null, "user_id": null}}}
2020-07-07 01:20:56.219418|{"entity_id": "sensor.cpu_get_throttled", "old_state": {"entity_id": "sensor.cpu_get_throttled", "state": "0", "attributes": {"friendly_name": "CPU get_throttled"}, "last_changed": "2020-07-07T01:13:50.270795+00:00", "last_updated": "2020-07-07T01:13:50.270795+00:00", "context": {"id": "40fd1f6bf4b64953b76c8197fab31be2", "parent_id": null, "user_id": null}}, "new_state": {"entity_id": "sensor.cpu_get_throttled", "state": "80008", "attributes": {"friendly_name": "CPU get_throttled"}, "last_changed": "2020-07-07T01:20:56.219173+00:00", "last_updated": "2020-07-07T01:20:56.219173+00:00", "context": {"id": "32a79f686d2941e9853efdf701662e37", "parent_id": null, "user_id": null}}}
2020-07-07 01:21:57.257719|{"entity_id": "sensor.cpu_get_throttled", "old_state": {"entity_id": "sensor.cpu_get_throttled", "state": "80008", "attributes": {"friendly_name": "CPU get_throttled"}, "last_changed": "2020-07-07T01:20:56.219173+00:00", "last_updated": "2020-07-07T01:20:56.219173+00:00", "context": {"id": "32a79f686d2941e9853efdf701662e37", "parent_id": null, "user_id": null}}, "new_state": {"entity_id": "sensor.cpu_get_throttled", "state": "0", "attributes": {"friendly_name": "CPU get_throttled"}, "last_changed": "2020-07-07T01:21:57.257501+00:00", "last_updated": "2020-07-07T01:21:57.257501+00:00", "context": {"id": "6ccc82ae70df4f59b350898ea747f38a", "parent_id": null, "user_id": null}}}
2020-07-07 01:22:58.267037|{"entity_id": "sensor.cpu_get_throttled", "old_state": {"entity_id": "sensor.cpu_get_throttled", "state": "0", "attributes": {"friendly_name": "CPU get_throttled"}, "last_changed": "2020-07-07T01:21:57.257501+00:00", "last_updated": "2020-07-07T01:21:57.257501+00:00", "context": {"id": "6ccc82ae70df4f59b350898ea747f38a", "parent_id": null, "user_id": null}}, "new_state": {"entity_id": "sensor.cpu_get_throttled", "state": "80008", "attributes": {"friendly_name": "CPU get_throttled"}, "last_changed": "2020-07-07T01:22:58.266806+00:00", "last_updated": "2020-07-07T01:22:58.266806+00:00", "context": {"id": "3f87cca3967e47b7806fe387045ea7cf", "parent_id": null, "user_id": null}}}
2020-07-07 01:23:58.177843|{"entity_id": "sensor.cpu_get_throttled", "old_state": {"entity_id": "sensor.cpu_get_throttled", "state": "80008", "attributes": {"friendly_name": "CPU get_throttled"}, "last_changed": "2020-07-07T01:22:58.266806+00:00", "last_updated": "2020-07-07T01:22:58.266806+00:00", "context": {"id": "3f87cca3967e47b7806fe387045ea7cf", "parent_id": null, "user_id": null}}, "new_state": {"entity_id": "sensor.cpu_get_throttled", "state": "80000", "attributes": {"friendly_name": "CPU get_throttled"}, "last_changed": "2020-07-07T01:23:58.177616+00:00", "last_updated": "2020-07-07T01:23:58.177616+00:00", "context": {"id": "8730d80dd1554ff993b71dab8164b5dd", "parent_id": null, "user_id": null}}}
2020-07-07 01:24:59.218367|{"entity_id": "sensor.cpu_get_throttled", "old_state": {"entity_id": "sensor.cpu_get_throttled", "state": "80000", "attributes": {"friendly_name": "CPU get_throttled"}, "last_changed": "2020-07-07T01:23:58.177616+00:00", "last_updated": "2020-07-07T01:23:58.177616+00:00", "context": {"id": "8730d80dd1554ff993b71dab8164b5dd", "parent_id": null, "user_id": null}}, "new_state": {"entity_id": "sensor.cpu_get_throttled", "state": "0", "attributes": {"friendly_name": "CPU get_throttled"}, "last_changed": "2020-07-07T01:24:59.218147+00:00", "last_updated": "2020-07-07T01:24:59.218147+00:00", "context": {"id": "e5843b38f384409bbffe776920c546a4", "parent_id": null, "user_id": null}}}
2020-07-07 01:26:00.174047|{"entity_id": "sensor.cpu_get_throttled", "old_state": {"entity_id": "sensor.cpu_get_throttled", "state": "0", "attributes": {"friendly_name": "CPU get_throttled"}, "last_changed": "2020-07-07T01:24:59.218147+00:00", "last_updated": "2020-07-07T01:24:59.218147+00:00", "context": {"id": "e5843b38f384409bbffe776920c546a4", "parent_id": null, "user_id": null}}, "new_state": {"entity_id": "sensor.cpu_get_throttled", "state": "80000", "attributes": {"friendly_name": "CPU get_throttled"}, "last_changed": "2020-07-07T01:26:00.173823+00:00", "last_updated": "2020-07-07T01:26:00.173823+00:00", "context": {"id": "597ce12d619d4d00b970142bdea99e81", "parent_id": null, "user_id": null}}}
2020-07-07 01:27:01.219214|{"entity_id": "sensor.cpu_get_throttled", "old_state": {"entity_id": "sensor.cpu_get_throttled", "state": "80000", "attributes": {"friendly_name": "CPU get_throttled"}, "last_changed": "2020-07-07T01:26:00.173823+00:00", "last_updated": "2020-07-07T01:26:00.173823+00:00", "context": {"id": "597ce12d619d4d00b970142bdea99e81", "parent_id": null, "user_id": null}}, "new_state": {"entity_id": "sensor.cpu_get_throttled", "state": "80008", "attributes": {"friendly_name": "CPU get_throttled"}, "last_changed": "2020-07-07T01:27:01.218867+00:00", "last_updated": "2020-07-07T01:27:01.218867+00:00", "context": {"id": "ec312ae54bf4408fba3f2315e19bdd8d", "parent_id": null, "user_id": null}}}
2020-07-07 01:29:03.256596|{"entity_id": "sensor.cpu_get_throttled", "old_state": {"entity_id": "sensor.cpu_get_throttled", "state": "80008", "attributes": {"friendly_name": "CPU get_throttled"}, "last_changed": "2020-07-07T01:27:01.218867+00:00", "last_updated": "2020-07-07T01:27:01.218867+00:00", "context": {"id": "ec312ae54bf4408fba3f2315e19bdd8d", "parent_id": null, "user_id": null}}, "new_state": {"entity_id": "sensor.cpu_get_throttled", "state": "0", "attributes": {"friendly_name": "CPU get_throttled"}, "last_changed": "2020-07-07T01:29:03.256402+00:00", "last_updated": "2020-07-07T01:29:03.256402+00:00", "context": {"id": "329ec9db57094397bb54f3296bd61508", "parent_id": null, "user_id": null}}}
2020-07-07 01:31:05.250675|{"entity_id": "sensor.cpu_get_throttled", "old_state": {"entity_id": "sensor.cpu_get_throttled", "state": "0", "attributes": {"friendly_name": "CPU get_throttled"}, "last_changed": "2020-07-07T01:29:03.256402+00:00", "last_updated": "2020-07-07T01:29:03.256402+00:00", "context": {"id": "329ec9db57094397bb54f3296bd61508", "parent_id": null, "user_id": null}}, "new_state": {"entity_id": "sensor.cpu_get_throttled", "state": "80000", "attributes": {"friendly_name": "CPU get_throttled"}, "last_changed": "2020-07-07T01:31:05.250462+00:00", "last_updated": "2020-07-07T01:31:05.250462+00:00", "context": {"id": "00c5b6bdf17b4d469a0fa9f62d93ce1e", "parent_id": null, "user_id": null}}}
sqlite>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment