Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use new mytoyota api endpoints #198

Merged
merged 71 commits into from
Jan 14, 2024
Merged
Changes from 1 commit
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
4ef5b3a
poetry update and use stub files in dev dependencies for better hints
CM000n Jan 1, 2024
139e057
update mytoyota dependency in manifest file
CM000n Jan 1, 2024
dae4a5b
fix implicit string concatenation
CM000n Jan 1, 2024
774e8d0
adapt config flow to new api
CM000n Jan 1, 2024
dd96fc7
adopt statistics gathering to upcoming mytoyota changes
CM000n Jan 2, 2024
9f5835a
adopt device tracker to new API
CM000n Jan 2, 2024
07eede1
update manifest file
CM000n Jan 2, 2024
60bac8c
add statistic to base entity
CM000n Jan 3, 2024
cd2af30
bump version
CM000n Jan 3, 2024
8086e1f
using brand from vehicle info
CM000n Jan 3, 2024
bebc384
simplify genrating of device tracker
CM000n Jan 3, 2024
6cc1fac
bump required minimum mytoyota version to 1.1.0
CM000n Jan 3, 2024
1f97c9e
remove unused binary sensors for now
CM000n Jan 3, 2024
c6ac342
simplify capability check
CM000n Jan 3, 2024
3576f64
adopt binary sensors to new api models
CM000n Jan 3, 2024
87e497c
fix import error
CM000n Jan 3, 2024
d9ad89c
use last_parked capability for generating device_tracker
CM000n Jan 3, 2024
310f7e4
make metric value choise a requirement
CM000n Jan 4, 2024
153d324
make metric value choise a requirement
CM000n Jan 4, 2024
50fd3b0
add translations
CM000n Jan 4, 2024
d8ca62c
bump minmum required mytoyota version
CM000n Jan 6, 2024
f2d7164
invert binary sensor logic
CM000n Jan 6, 2024
c6e5110
merge master
CM000n Jan 8, 2024
d0b2d31
only create trunk status binary_sensor if bonnet_status capability is…
CM000n Jan 8, 2024
758eb67
run pre-commit on all files
CM000n Jan 8, 2024
f27b42d
return None if try block fails
CM000n Jan 8, 2024
eeb1779
increase update_interval to 5 minutes
CM000n Jan 8, 2024
1eec460
adjust driver door lock icon
CM000n Jan 8, 2024
588d6a3
make metric value information available for further steps
CM000n Jan 8, 2024
241113c
adopt statistics sensors to new api
CM000n Jan 8, 2024
4fb4ee6
update statistics utils and delete unsused constants
CM000n Jan 8, 2024
c9cda60
add vin sensor
CM000n Jan 8, 2024
97de4bd
display all vehicle informations in vin sensor
CM000n Jan 9, 2024
30fad24
display ev summary also for pure electric vehicles
CM000n Jan 9, 2024
5ac3feb
return timdelta and date as string
CM000n Jan 9, 2024
e325833
add odometer and fuel sensors
CM000n Jan 9, 2024
6af3f53
clean up sensor translations
CM000n Jan 9, 2024
5c1f2d3
format vin sensor attributes
CM000n Jan 9, 2024
a7e1bba
use car_model_name
CM000n Jan 9, 2024
87f30c7
make battery_level sensor available for all ev vehicles
CM000n Jan 9, 2024
c20a4ae
use upper case for asi_code and imei
CM000n Jan 9, 2024
6c4438a
fix battery_level sensor
CM000n Jan 9, 2024
8d05180
return only true capabilities
CM000n Jan 9, 2024
aec7cda
add battery_range
CM000n Jan 9, 2024
90ded8d
add total_range
CM000n Jan 9, 2024
3c514bd
add battery_range_ac
CM000n Jan 9, 2024
e8fc10d
fix unpacking
CM000n Jan 9, 2024
d5cc6c5
reurn dict instead of list
CM000n Jan 9, 2024
fe5455d
mask pii data in attributes
CM000n Jan 9, 2024
119234e
round range and level values
CM000n Jan 9, 2024
8df5b43
bump minimum required mytoyota version to 1.1.3
CM000n Jan 9, 2024
fd03a97
reduce line-length
CM000n Jan 9, 2024
2780ab1
no need for masking Katashiki_code
CM000n Jan 10, 2024
e1919aa
add duration and distance to summary attributes
CM000n Jan 10, 2024
2d59460
remove redundant vin information in attributes
CM000n Jan 10, 2024
3d531ac
remove redundant information
CM000n Jan 10, 2024
c9427fd
rename fuel consumption
CM000n Jan 10, 2024
b41eb69
bump minimum required mytoyota version to 1.2.0
CM000n Jan 11, 2024
a8283c7
add average_fuel_consumed to vin sensor attributes
CM000n Jan 11, 2024
3619f37
use dictionary merging
CM000n Jan 11, 2024
0daba1d
Make use of new helper functions for statistics
CM000n Jan 11, 2024
279c9fe
Update readme
CM000n Jan 11, 2024
785aa47
generate battery sensors only for ev vehicles
CM000n Jan 11, 2024
8c53722
Merge branch 'enhancement/use_new_mytoyota_api' of github.com:DurgNom…
CM000n Jan 11, 2024
ec683f2
Use Mapping for brand names
CM000n Jan 11, 2024
69ad37f
create odometer only when telemetry capable
CM000n Jan 11, 2024
ad00a00
Update French translations (#203)
pierrebelloy Jan 11, 2024
ec2b3bc
Use same condition for ev vehicles like in mytoyota lib
CM000n Jan 11, 2024
37f1e5f
Merge branch 'enhancement/use_new_mytoyota_api' of github.com:DurgNom…
CM000n Jan 11, 2024
d08a2b1
use same condition for last_parked like in mytoyota lib
CM000n Jan 11, 2024
d661f35
create statistics sensors by default for now
CM000n Jan 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
create odometer only when telemetry capable
CM000n committed Jan 11, 2024

Verified

This commit was signed with the committer’s verified signature.
MichaReiser Micha Reiser
commit 69ad37f750267e188d80c5d97e26447f9d7d7a21
6 changes: 4 additions & 2 deletions custom_components/toyota/sensor.py
Original file line number Diff line number Diff line change
@@ -289,12 +289,14 @@ async def async_setup_entry(
ToyotaSensor,
),
(
entry.data[CONF_METRIC_VALUES] is True,
entry.data[CONF_METRIC_VALUES] is True
and vehicle._vehicle_info.extended_capabilities.telemetry_capable,
ODOMETER_ENTITY_DESCRIPTION_KM,
ToyotaSensor,
),
(
entry.data[CONF_METRIC_VALUES] is False,
entry.data[CONF_METRIC_VALUES] is False
and vehicle._vehicle_info.extended_capabilities.telemetry_capable,
ODOMETER_ENTITY_DESCRIPTION_MILES,
ToyotaSensor,
),