File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed
custom_components/rtetempo Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change 31
31
API_VALUE_BLUE ,
32
32
FRANCE_TZ ,
33
33
HOUR_OF_CHANGE ,
34
+ USER_AGENT ,
34
35
)
35
36
36
37
_LOGGER = logging .getLogger (__name__ )
@@ -222,7 +223,8 @@ def _get_tempo_data(
222
223
"end_date" : end_str [:- 2 ] + ":" + end_str [- 2 :],
223
224
}
224
225
headers = {
225
- "Accept" : "application/json"
226
+ "Accept" : "application/json" ,
227
+ "User-Agent" : USER_AGENT ,
226
228
}
227
229
_LOGGER .debug (
228
230
"Calling %s with start_date as '%s' and end_date as '%s'" ,
Original file line number Diff line number Diff line change 52
52
API_VALUE_WHITE = "WHITE"
53
53
API_VALUE_BLUE = "BLUE"
54
54
API_ATTRIBUTION = "Données fournies par data.rte-france.com"
55
+ USER_AGENT = "github.com/hekmon/rtetempo v1.2.1"
55
56
56
57
57
58
# Tempo def
You can’t perform that action at this time.
0 commit comments