|
8 | 8 | from gql.transport.websockets import WebsocketsTransport |
9 | 9 |
|
10 | 10 | from pyhilo import API |
11 | | -from pyhilo.const import LOG |
| 11 | +from pyhilo.const import LOG, PLATFORM_HOST |
12 | 12 | from pyhilo.device.graphql_value_mapper import GraphqlValueMapper |
13 | 13 | from pyhilo.devices import Devices |
14 | 14 |
|
@@ -534,7 +534,7 @@ async def call_get_location_query(self, location_hilo_id: str) -> None: |
534 | 534 | """This functions calls the digital-twin and requests location id""" |
535 | 535 | access_token = await self._get_access_token() |
536 | 536 | transport = AIOHTTPTransport( |
537 | | - url="https://platform.hiloenergie.com/api/digital-twin/v3/graphql", |
| 537 | + url=f"https://{PLATFORM_HOST}/api/digital-twin/v3/graphql", |
538 | 538 | headers={"Authorization": f"Bearer {access_token}"}, |
539 | 539 | ) |
540 | 540 | client = Client(transport=transport, fetch_schema_from_transport=True) |
@@ -562,7 +562,7 @@ async def subscribe_to_device_updated( |
562 | 562 | LOG.debug("subscribe_to_device_updated while true") |
563 | 563 | access_token = await self._get_access_token() |
564 | 564 | transport = WebsocketsTransport( |
565 | | - url=f"wss://platform.hiloenergie.com/api/digital-twin/v3/graphql?access_token={access_token}", |
| 565 | + url=f"wss://{PLATFORM_HOST}/api/digital-twin/v3/graphql?access_token={access_token}", |
566 | 566 | ssl=ssl_context, |
567 | 567 | ) |
568 | 568 | client = Client(transport=transport, fetch_schema_from_transport=True) |
@@ -602,7 +602,7 @@ async def subscribe_to_location_updated( |
602 | 602 | ) -> None: |
603 | 603 | access_token = await self._get_access_token() |
604 | 604 | transport = WebsocketsTransport( |
605 | | - url=f"wss://platform.hiloenergie.com/api/digital-twin/v3/graphql?access_token={access_token}" |
| 605 | + url=f"wss://{PLATFORM_HOST}/api/digital-twin/v3/graphql?access_token={access_token}" |
606 | 606 | ) |
607 | 607 | client = Client(transport=transport, fetch_schema_from_transport=True) |
608 | 608 | query = gql(self.SUBSCRIPTION_LOCATION_UPDATED) |
|
0 commit comments