mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-13 20:36:52 +00:00
Implement changes to the data from the analytics site (#17572)
This commit is contained in:
parent
0f09559ca3
commit
a39c8a290a
3
Rakefile
3
Rakefile
@ -185,10 +185,9 @@ task :analytics_data do
|
||||
uri = URI('https://analytics.home-assistant.io/data.json')
|
||||
|
||||
remote_data = JSON.parse(Net::HTTP.get(uri))
|
||||
last_entry=remote_data.keys().sort().reverse()[0]
|
||||
|
||||
File.open("#{source_dir}/_data/analytics_data.json", "w") do |file|
|
||||
file.write(JSON.generate(remote_data[last_entry]))
|
||||
file.write(JSON.generate(remote_data['current']))
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user