Skip to content

Commit

Permalink
Updating Workflow To Not Ignore Brands
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanmac8 authored and github-actions[bot] committed Dec 23, 2020
1 parent a905a1e commit d8d5666
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 12 deletions.
1 change: 0 additions & 1 deletion .github/workflows/combined.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ jobs:
- uses: hacs/action@main
with:
CATEGORY: integration
ignore: "brands"
- uses: "home-assistant/actions/hassfest@master"
- uses: KTibow/ha-blueprint@main
name: CI
Expand Down
8 changes: 4 additions & 4 deletions custom_components/mintmobile/api.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import datetime
import requests


import requests

Expand Down Expand Up @@ -86,15 +84,17 @@ def get_family_members(self):
response = r.json()

# Uncomment line below to test integration that doesn't have family lines.
#response={'hasAvailableLine': True, 'hasActionRequired': False, 'activeMembers': [], 'requests': []}
# response={'hasAvailableLine': True, 'hasActionRequired': False, 'activeMembers': [], 'requests': []}
if response["activeMembers"]:
for activeMembers in response["activeMembers"]:
self.family_members.append(activeMembers["id"])
self.info[activeMembers["id"]] = {}
# self.info[activeMembers['id']]={"phone_number":activeMembers['msisdn'],"line_name":activeMembers['nickName']}
self.info[activeMembers["id"]]["phone_number"] = activeMembers["msisdn"]
self.info[activeMembers["id"]]["line_name"] = activeMembers["nickName"]
self.info[activeMembers["id"]]["endOfCycle"] = self.epoch_days_remaining(
self.info[activeMembers["id"]][
"endOfCycle"
] = self.epoch_days_remaining(
activeMembers["currentPlan"]["rechargeDate"]
)
self.info[activeMembers["id"]]["months"] = activeMembers["currentPlan"][
Expand Down
10 changes: 5 additions & 5 deletions custom_components/mintmobile/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ async def async_step_user(self, user_input=None):
] = str
data_schema[vol.Required("password", default="")] = str


return self.async_show_form(
step_id="user",
data_schema=vol.Schema(data_schema),
Expand Down Expand Up @@ -126,8 +125,8 @@ async def _test_credentials(self, username, password):
def async_get_options_flow(config_entry):
return OptionsFlowHandler(config_entry)

class OptionsFlowHandler(config_entries.OptionsFlow):

class OptionsFlowHandler(config_entries.OptionsFlow):
def __init__(self, config_entry):
"""Initialize HACS options flow."""
self.config_entry = config_entry
Expand All @@ -140,14 +139,15 @@ async def async_step_init(self, user_input=None):

async def async_step_user(self, user_input=None):
if user_input is not None:
self._data=user_input
self._data = user_input
return await self._update_options()

data_schema = OrderedDict()
data_schema[vol.Required("username", default=self.config_entry.data.get(CONF_USERNAME))] = str
data_schema[
vol.Required("username", default=self.config_entry.data.get(CONF_USERNAME))
] = str
data_schema[vol.Required("password", default="")] = str


return self.async_show_form(
step_id="user",
data_schema=vol.Schema(data_schema),
Expand Down
4 changes: 2 additions & 2 deletions custom_components/mintmobile/test.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
from api import MintMobile
import pprint

from api import MintMobile

pp = pprint.PrettyPrinter(indent=4)

username = input("Phone Number: ")
password = input("Enter Your Password: ")


mm = MintMobile(username,password)
mm = MintMobile(username, password)
print("Logging Into Mint Mobile.")
if mm.login():
print("Login Successful")
Expand Down

0 comments on commit d8d5666

Please sign in to comment.